Git 1.8: it push error: dst ref refs/heads/master receives from more than one src

后端 未结 5 1657
野趣味
野趣味 2021-02-18 17:43

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.         


        
5条回答
  •  一生所求
    2021-02-18 18:08

    It looks like you have an extra copy of your refs tree within refs/remotes/origin. Notice how within refs/remotes/origin, you have an extra refs directory? I don't know how this got there, but it's probably what is causing your problems. Due to the way Git handles abbreviations of refs (allowing you to drop the prefix, using only the suffix like origin/master), it is probably getting confused by having both refs/remotes/origin/master and refs/remotes/refs/remotes/origin/master.

    I don't know how it got into this state; possibly a bug in a Git tool, possibly a typo that you made at some point. You fixed half of the problem by deleting the remote branch that was tracking this duplicate branch. I would be willing to bet you can fix the other half of the problem, and be able to do git push again, if you delete the refs/remotes/origin/refs directory.

提交回复
热议问题