Opposite of git branch
I would like to stop tracking certain branches. I set up tracking using git branch --set-upstream foo origin/foo
.
How do I undo this?
尝试以下方法:
git config --unset branch.<branch>.remote
git config --unset branch.<branch>.merge
In git 1.8, which will be released shortly, you'll be able to do:
git branch --unset-upstream
However, for the moment you would have to do as manojlds suggests, and use two git config --unset
commands.
If I've understood you want to remove the association between the local and remote branch... I think one of the easiest way should be by editing the config file (.git/config).
You can find something related to your question here
To remove the association between the local and remote branch, and delete the local branch, run:
git config --unset branch.<branch>.remote
git config --unset branch.<branch>.merge
git branch -d <branch>
链接地址: http://www.djcxy.com/p/26100.html
上一篇: 如何在SVN后彻底清理
下一篇: git分支的对面