tags:

views:

96

answers:

1

I checked the relevant thread but still can't solve this problem.

When I typed "git remote show origin", I got

* remote origin
  Fetch URL: xxxx
  Push  URL: xxxx
  HEAD branch (remote HEAD is ambiguous, may be one of the following):
    development
    master
  Remote branches:
    development tracked
    master      tracked
  Local branches configured for 'git pull':
    development merges with remote development
    master      merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)

I also checked "git show-ref", and I got:

3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/development
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/master
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/development
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/master

Here is the list of all branches I have by executing "git branch -a"

  development
* master
  remotes/origin/development
  remotes/origin/master

And this is what is in the .git/config:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    ignorecase = true
    hideDotFiles = dotGitOnly
    autocrlf = false
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = xxxx
    push = refs/heads/master:refs/heads/master
[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "development"]
    remote = origin
    merge = refs/heads/development

I and it seems that the remote development and master branch share the same node. How to solve this ambiguity problem? Thank you!

+2  A: 

there is nothing wrong with your remote repos. git tells you "remote HEAD is ambiguous" because master/development has same SHA1 if you just branch development out from master, that's what they should be.

try to commit something to master or development branch and push it to origin, that "ambiguous" message will be gone

number5