I have a git repository that is tracking several remote branches:
$ git branch -a
* master
remotes/git-svn
remotes/origin/master
remotes/trunk
When I try to setup a default one I get the following error:
$ git branch --set-upstream-to=origin/master master
warning: refname 'origin/master' is ambiguous.
fatal: Ambiguous object name: 'origin/master'.
I would like to kremove some of the remote master branches but the master references are still there. How can I remove them to be able to set the default upstream branch to origin/master
?
$ git show-ref master
cba97a58c99743c355b569bbf35636c8823c2d96 refs/heads/master
6726b4985107e2ddc7539f95e1a6aba536d35bc6 refs/origin/master
d83f025cd3800ed7acd76b2e52ae296e33f1cd07 refs/original/refs/heads/master
cba97a58c99743c355b569bbf35636c8823c2d96 refs/remotes/origin/master