GitLab 显示已删除的分支
GitLab shows deleted branches
我在 GitLab 中显示分支时遇到问题。在显示的分支之间有两个被删除。我相信这是因为他们的名字 origin/ondrat/xxxxx
和 origin/vladan/xxxxx
。所以完整路径 pathspec 是 origin/origin/ondtrat...
。这两个分支不会出现在列表中 git branch -r
并且在 GitLab UI 中无法删除。当我尝试在 GitLab 中删除它们时,没有任何反应。
有没有办法消除它们或者这是一个错误?
你试过推 "empty" 分支吗?
喜欢git 推送来源:origin/ondrat/xxxxx ?
$ git remote add gitlab <url>
$ git push gitlab --delete <branchname>
一位同事(内部 GitLab
维护者)解释说,the branches are gone but the tracking information is not.
要删除跟踪信息:
选项 1
$ git fetch --prune
选项 2(在干净的分支上)
$ git merge --prune
背景
我遇到了类似的情况,合并到master后删除了远程分支,我删除了本地分支,但是远程分支仍然出现在git branch -a
[samveen@development opsgenie_webhook]$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/submodules
remotes/origin/update1
此外,在结账时,回购协议的状态是 detached HEAD
:
[samveen@development opsgenie_webhook]$ git checkout remotes/origin/submodules
M libs
Note: checking out 'remotes/origin/submodules'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 6d9727e... Add target first_init
我在 GitLab 中显示分支时遇到问题。在显示的分支之间有两个被删除。我相信这是因为他们的名字 origin/ondrat/xxxxx
和 origin/vladan/xxxxx
。所以完整路径 pathspec 是 origin/origin/ondtrat...
。这两个分支不会出现在列表中 git branch -r
并且在 GitLab UI 中无法删除。当我尝试在 GitLab 中删除它们时,没有任何反应。
有没有办法消除它们或者这是一个错误?
你试过推 "empty" 分支吗? 喜欢git 推送来源:origin/ondrat/xxxxx ?
$ git remote add gitlab <url>
$ git push gitlab --delete <branchname>
一位同事(内部 GitLab
维护者)解释说,the branches are gone but the tracking information is not.
要删除跟踪信息:
选项 1
$ git fetch --prune
选项 2(在干净的分支上)
$ git merge --prune
背景
我遇到了类似的情况,合并到master后删除了远程分支,我删除了本地分支,但是远程分支仍然出现在git branch -a
[samveen@development opsgenie_webhook]$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/submodules
remotes/origin/update1
此外,在结账时,回购协议的状态是 detached HEAD
:
[samveen@development opsgenie_webhook]$ git checkout remotes/origin/submodules
M libs
Note: checking out 'remotes/origin/submodules'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 6d9727e... Add target first_init