gpt4 book ai didi

git - 不使用 git branch -r 显示所有远程分支

转载 作者:太空狗 更新时间:2023-10-29 14:44:36 25 4
gpt4 key购买 nike

当我执行命令时:

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com