I am looking at the repository where I created a feature branch from the main branch and someone else merged my feature branch into the main branch.
The repository which I am looking at was first created by cloning a github repository and then pulled multiple times from the github repository.
I believe that there are other feature branches created by others.
But when I run git branch
, it doesn't show the feature branches created by others.
What might be the reason for that?
Thanks.
答案 0 :(得分:2)
git branch
仅列出本地存储库中可用的分支。正如评论中所提到的,你可以传递给它的标志,列出其他分支。
如果评论错误,则建议-ra
标记在一起。这实际上是多余的:-r
将列出远程跟踪分支仅,而-a
将列出所有分支(本地和远程)。
如果你想了解更多,我会link to the man page for git branch
。快乐阅读!
答案 1 :(得分:-1)
尝试Git branch -A
它会显示您拥有的所有分支,以及您尚未从github下载的分支