git不会检测到远程分支
我已经克隆了一个存储库(如果相关,则来自gitlab) 我在本地计算机上得到了存储库,分支为 master
我想结帐到另一个分支 enter_target
i i可以 明显 em>请参阅该分支存在于遥控存储库中。 但是,当我这样做时,
git checkout another_target
我
error: pathspec 'another_target' did not match any file(s) known to git
只是要检查我
git branch -r
,不!分支另一个_target不会出现!
但是我可以在存储库中看到它!
为什么会发生这种情况?如何解决?
I have cloned a repository (from gitlab if relevant)
I got the repo in my local machine, the branch being master
I want to checkout to another branch another_target
I can clearly see that this branch exist in the remote repo.
However when I do
git checkout another_target
I got
error: pathspec 'another_target' did not match any file(s) known to git
Just to check I do
git branch -r
and no! the branch another_target does not appear!
But I can see it in the repo!
Why is this happening and how can I solve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要更新远程分支,您应该首先运行,
然后如果存在远程分支,则应使用
Checkout
To update your remote branches you should first run
then your
checkout
should work if the remote branch exists