I've had simple project being managed in a Git repository. To date I haven't intentionally created any branches, but when I tried to create my first today using
$ git branch mybranch
I see this error:
warning: refname 'master' is ambiguous.
fatal: Ambiguous object name: 'master'.
Digging deeper:
$ git branch -a
* master
remotes/master/HEAD -> master/master
remotes/master/master
Is this normal to see in Git? Have I cloned my repository incorrectly? What is the best way to resolve this problem?
It seems it's ambiguous because your remote name and branch name are both master
. You can try renaming the remote to the more conventional origin
by running
git remote rename master origin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With