He comprobado los hilos relevantes, pero todavía no puedo entender lo que está sucediendo detrás de las escenas.Git. Remote HEAD es ambiguo
Cuando he escrito git remote show origin
, que tengo:
* 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)
También comprobé git show-ref
, y tengo:
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/development
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/master
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/development
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/master
Aquí está la lista de todas las ramas que tengo ejecutando git branch -a
:
development
* master
remotes/origin/development
remotes/origin/master
Y esto es lo que está en .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
Parece que el desarrollo remoto y la rama principal comparten el mismo nodo. ¿Cómo resuelvo este problema de ambigüedad?