I have a git repository that is tracking several remote branches:
$ git branch -a
* master
remotes/git-svn
remotes/origin/master
remotes/trunk
<
I faced same problem few days ago where there were multiple references created of the same branch.
Things i tried:
> git show-ref (will give you the list of references, from the
> references list you can check if there are multiple references created
> for the branch you are working on or not.)
If there are multiple references created then simply remove it
rm .git/refs/heads/master
After removing the references you can take the checkout of the branch from remote origin only if you have pushed something in it, otherwise you have to redo everything which you did in the branch
git fetch origin
git checkout origin/branchName
This solution worked out for me in case of ambiguous branches.