我团队中的其他人创建了一个新的git分支,提交并推送到我们使用的常用遥控器.当我试图查看这个分支时,我得到了这个:
% git checkout 12382
fatal: Cannot switch branch to a non-commit '12382'
Run Code Online (Sandbox Code Playgroud)
我没有遇到从这个存储库中检出其他分支的麻烦; 尝试在此之后检查另一个(一个我没有本地副本),它工作正常.
我尝试在Go管道上使用此分支构建服务器,它工作正常 - 这意味着服务器成功检出了该分支.
试过这个以检查事物的状态:
% git remote show origin
* remote origin
Fetch URL: git@gitlab.mycompany.com:mycompany/myrepository.git
Push URL: git@gitlab.mycompany.com:mycompany/myrepository.git
HEAD branch: stage
Remote branches:
10112 tracked
10198 tracked
10678 tracked
...
12382 tracked <<<---
...
Local branches configured for 'git pull':
...
Local refs configured for 'git push':
...
Run Code Online (Sandbox Code Playgroud)
谁能建议如何解决这个问题?什么地方出了错?