当已经检查了所有分支时,如何签出分支机构。

发布于 2025-02-09 07:32:42 字数 902 浏览 0 评论 0原文

我正在尝试结帐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 prunegit worktree remove removegit 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 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文