Reputation: 579
I am new to Git,when I executed the following command:
git status
I got this message:
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
....
If I executed
git branch -a
I got the following:
* master
remotes/origin/master
When executed this:
git show-ref
Got this:
64b0e322f945691e8365a0c1b5f93d6584cde4a5 refs/FETCH_HEAD
e4fcd3322fb3cf4eb5b369c62e99073d60afec74 refs/HEAD
e4fcd3322fb3cf4eb5b369c62e99073d60afec74 refs/heads/master
e5408db40c31909d50c25f60146499b09746b84b refs/remotes/origin/master
I'm in China, you know , the Network always unstable,was it related to some transport error when pull from remote repo?
Thansk A Lot!
Upvotes: 5
Views: 4802
Reputation: 487725
The problem is that you have both a .git/refs/HEAD
file and a .git/HEAD
file. The .git/HEAD
file must always be present (and the contents you showed in a comment are reasonable). The .git/refs/HEAD
file probably should not exist at all, but it's not clear what created it.
(The file .git/refs/FETCH_HEAD
also should not exist, and again it's not clear what created it.)
Upvotes: 3