当已经检查了所有分支时,如何签出分支机构。
我正在尝试结帐Docker容器中的GIT分支。
当我尝试git Checkout< branch>
从my< docker容器>我得到致命:< branch>已经检查了AT at< pathname>/workspaces/worktrees/< docker容器>
错误。
退出Docker容器并输入一个新的容器,只是更改了< docker容器>
在其中签出了分支。这是我在< branch4>
的Docker容器中的所有分支中发生的
。 git worktree列表
返回以下内容:
/<path>/workspaces/repo 9ab1cee0 [master]
/<path>/workspaces/worktrees/branch4 77fe428a [branch1]
/<path>/workspaces/worktrees/branch4 17b659bf [branch2]
/<path>/workspaces/worktrees/branch4 39607a0b [branch3]
/<path>/workspaces/worktrees/branch4 c8ea6d36 [branch4]
我尝试过git worktree prune
,git worktree remove remove
,git worktree emove -force <-force < /code>,我已经对整个存储库进行了核算,然后再次克隆了它,我有些茫然。
I am trying to checkout a git branch within a docker container.
When I attempt to git checkout <branch>
from my <docker container> I get a fatal: <branch> is already checked out at <pathname>/workspaces/worktrees/<docker container>
error.
Exiting the docker container and entering a new one merely changes the <docker container>
in which the branch is checked out. This occurs with all branches that I have in local
In the docker container of <branch4>
, for example,git worktree list
returns the following:
/<path>/workspaces/repo 9ab1cee0 [master]
/<path>/workspaces/worktrees/branch4 77fe428a [branch1]
/<path>/workspaces/worktrees/branch4 17b659bf [branch2]
/<path>/workspaces/worktrees/branch4 39607a0b [branch3]
/<path>/workspaces/worktrees/branch4 c8ea6d36 [branch4]
I've tried git worktree prune
, git worktree remove
, git worktree remove --force
, I've nuked the entire repo and cloned it again, I'm somewhat at a loss.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论