I have local branches ‘master’ and vam-master’ which tracks remote branch ‘application/master’ and ‘application/vam-master’ respectively.
$ git branch -a
* master
vam-master
remotes/application/master
remotes/application/pvm-master
$ git branch -r
m/ds-2.3.1_r1 -> application/master
application/master
application/vam-master
But for some reason now the ‘vam-master’ is tracking ‘application/master’, instead of ‘application/vam-master’. How can I fix it?
When i do ‘git status’, I get:
$ git checkout vam-master
Switched to branch 'vam-master'
Your branch and 'application/master' have diverged,
and have 49 and 13 different commit(s) each, respectively.
Thank you.
Should do the trick. See also the man pages of
git branch.Another option (less elegant) is to edit
.git/configand correct the entries there.