Another issue with git 1.8:
$ git push
error: dst ref refs/heads/master receives from more than one src.
error: failed to push some refs to 'gitosis@xxx.xx:xxx.git'
Suggestions? It was working before upgrading to 1.8.
$ git remote -v
origin gitosis@xxx.xx:xxx.git (fetch)
origin gitosis@xxx.xx:xxx.git (push)
After googling around I tried this first:
$ git push origin :refs/heads/refs/heads/master
remote: warning: Allowing deletion of corrupt ref.
To gitosis@xxx.xx:xxx.git
- [deleted] refs/heads/master
No idea what is that and why it was corrupt.
$ git pull
Already up-to-date.
$ git push
error: dst ref refs/heads/master receives from more than one src.
error: failed to push some refs to 'gitosis@xxx.xx:xxx.git'
Still not working, but origin master
did work at least:
$ git push origin master
Counting objects: 42, done.
To gitosis@xxx.xx:xxx.git
3e3fc87..6e11d2a master -> master
Okay, that kind of fixed it but what was the cause of the issue to begin with? Why origin/master suddenly got corrupted? What did I do with git push origin :refs/heads/refs/heads/master
?
.git/config
:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = gitosis@xxx.xx:xx.git
push = HEAD
[branch "master"]
remote = origin
merge = refs/heads/master
ls .git/refs/remotes/origin:
HEAD master refs
In the end, now I have to do git push origin master
every time. And the most annoying is that some repos work with git push
, but on the most of them I got to add origin master
but I don't understand why, and it can't be that I am alone having this problem.