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?
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?
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.
Try the below:
git config --unset branch.<branch>.remote
git config --unset branch.<branch>.merge
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>