当我执行命令时:
git branch -r,它只显示:
origin/HEAD -> origin/master
origin/development-elton
origin/master
执行命令时:
git remote show origin,它显示:
remote origin
Fetch URL: git@bitbucket.org:r2a_/grconsig.git
Push URL: git@bitbucket.org:r2a_/grconsig.git
HEAD branch: master
Remote branches:
caio-dev new (next fetch will store in remotes/origin)
controle-usuario new (next fetch will store in remotes/origin)
development-elton tracked
master tracked
rails-admin new (next fetch will store in remotes/origin)
**refinancy new (next fetch will store in remotes/origin)**
如何为我的本地 pull 分行再融资?
最佳答案
如果现有的答案还不够,您可以检查您的.git/config
文件。就我而言,我有以下部分:
[remote "origin"]
url = https://github.com/John/project1
fetch = +refs/heads/master:refs/remotes/origin/master
我已将文件编辑为:
[remote "origin"]
url = https://github.com/John/project1
fetch = +refs/heads/*:refs/remotes/origin/*
然后,我能够使用 git fetch
获取所有分支。
有时会发生这种情况,如果您更改远程存储库:
git remote set-url origin https://github.com/John/project1
关于git - 不使用 git branch -r 显示所有远程分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35733312/