Git 1.8:它推送错误:dst ref refs / heads / master从多个src接收 [英] Git 1.8: it push error: dst ref refs/heads/master receives from more than one src
问题描述
另一个与git 1.8有关的问题:
$ git push
错误:dst ref refs / heads / master received来自不止一个src。
错误:未能将一些文件推送到'gitosis@xxx.xx:xxx.git'
建议?它在升级到1.8之前正在工作。
$ git remote -v
原产地gitosis@xxx.xx:xxx。 git(fetch)
origin gitosis@xxx.xx:xxx.git(push)
搜索结果后,我先试了一下:
$ git push origin:refs / heads / refs / heads / master
远程:警告:允许删除损坏的参考。
到gitosis@xxx.xx:xxx.git
- [已删除] refs / heads / master
$
$ b
$ git pull
已经准备好了吗?b $ b 不知道这是什么以及它为什么被损坏。 -至今。
$ git push
错误:dst ref refs / heads / master从多个src接收。
错误:未能将一些文件推送到'gitosis@xxx.xx:xxx.git'
仍然不起作用,但 origin master
至少有效:
$ git push origin master
计数对象:42,完成。
至gitosis@xxx.xx:xxx.git
3e3fc87..6e11d2a master - >大师
好的,那种解决方法,但问题的起因是什么?为什么起源/主人突然遭到损坏?我在做什么 git push origin:refs / heads / refs / heads / master
?
:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remoteorigin]
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
最后,现在我每次都要做 git push origin master
。最烦人的是,一些回购工作与 git push
,但他们中的大多数,我得到添加原点大师
但我不明白为什么,也不能说我独自一人有这个问题。 解决方案
如果你不小心输入了你试图推送两次的分支的名字,比如:
git push master otherBranch master moreBranches
产生此错误。修正很明显,一旦你意识到你已经做到了:
git push master otherBranch moreBranches
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.
Another way to get this error is if you accidentally type in the name of the branch you are trying to push twice, i.e.:
git push master otherBranch master moreBranches
Yields this error. Fix is obvious once you're aware you've done it:
git push master otherBranch moreBranches
这篇关于Git 1.8:它推送错误:dst ref refs / heads / master从多个src接收的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!