如何将新的开发分支推向镜像的Gitea存储库?

发布于 2025-01-18 07:42:40 字数 182 浏览 2 评论 0原文

如果不将上游推向上游,似乎无法将新的分支推向镜像存储库。 我在Gitea中创建了一个镜像存储库,它是从GitHub存储库中同步的。我将Gitea存储库克隆到本地,并创建了一个新的分支。现在,我想将新分支推向Gitea,它报告说远程存储库是只读的。 “远程:镜像存储库仅读取” 这是否意味着它不能推到镜像存储库,而唯一的方法是将存储库转换为普通存储库?

It seems can't push commits to a new branch to a mirror repository without setting push to upstream.
I created a mirror repository in gitea, it synchronizes from a GitHub repository period. I cloned the gitea repository to my local and created a new branch. Now I want to push the new branch to gitea, it reports that the remote repository is read-only.
"remote: mirror repository is read-only"
Does it mean that it can't push to a mirrored repository and the only way is to convert the repository to a normal one?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

靑春怀旧 2025-01-25 07:42:40

当前分支所有文件用目标分支覆盖

`git merge <branch-name>`

将分支更改为分支名称

`git checkout <branch-name>`

删除所有更改 从新分支

`git merge --abort`

合并 获取新分支

`git pull origin <Remote-branch-name>:<Local-branch-name>`

将所有更改从远程分支获取到本地 当前分支

`git pull origin <branch-name>`

删除本地分支

`git branch -d <branch-name>`

警报(不要使用此)首先使用 use 'git merge --abort'

`git branch -D <branch-name>`

重命名本地分支

`git branch -m <branch-name>`

删除远程分支

`git push origin --delete <branch-name>`

撤消 Git 中最近的本地提交?删除与提交相关的文件

git reset --hard HEAD~1

,因此,在

git reset --hard HEAD~2
git reset --hard HEAD~3
git push origin +HEAD^:Branch_name

撤消最近的本地提交时,但不删除

git reset HEAD~1
最后两个提交的
git reset HEAD~2

文件从远程 git 存储库中删除最后一次提交

强制完全拉取分支
git reset --hard origin/master

current branch all file over-write with target branch

`git merge <branch-name>`

change branch to branch name

`git checkout <branch-name>`

remove all change merge from new branch

`git merge --abort`

fetch new branch

`git pull origin <Remote-branch-name>:<Local-branch-name>`

fetch all changes from remote branch into local current branch

`git pull origin <branch-name>`

delete local branch

`git branch -d <branch-name>`

alert (do not use this) first use use 'git merge --abort'

`git branch -D <branch-name>`

rename local branch

`git branch -m <branch-name>`

delete remote branch

`git push origin --delete <branch-name>`

undo the most recent local commit in Git? Delete files related to commit

git reset --hard HEAD~1

and So, on

git reset --hard HEAD~2
git reset --hard HEAD~3
git push origin +HEAD^:Branch_name

undo most recent local commit But not delete files

git reset HEAD~1
for last two commit
git reset HEAD~2

Remove last commit from remote git repository

force fully pull branch
git reset --hard origin/master
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文