问题描述
标题说的是什么。版本的git是1.5.6.3我尝试过使用git分支--track
但它会引发错误,说明分支已经存在。我很困惑。
预先感谢!
有一个名为例如develop的分支,并且您想要将其从远程的类似命名的分支上解除链接,请尝试以下操作:
git config --remove-section branch.develop
这会从您的本地工作副本。
在此变更前后查看 git config --list
以查看差异。你很明显可以通过编辑你的 .git / config
文件来完成同样的事情,但我喜欢使用 git config
相反。
What the title says. Version of git is 1.5.6.3I've tried using git branch --trackBut it throws errors saying that the branches already exist. I am confused.
Thanks in advance!
If you have a branch named, e.g., "develop" and you want to "unlink" it from a similarly named branch on a remote, try this:
git config --remove-section branch.develop
This will remove the configuration from your local working copy.
Take a look at git config --list
before and after this change to see the difference. You could obviously accomplish the same thing by simply editing your .git/config
file, but I like to use git config
instead.
这篇关于GIT:我如何删除任何使远程分支跟踪本地分支的配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!