有些eclipse在使用git的时候不会记录URL,每次都得重新输入,并且在pull的时候就会报如上错误,解决方法为:
在该工程的.git目录下,修改config文件的内容为:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin"]
url = https://git.oschina.net/xyh/competetion.git(改成你自己的URL)
fetch = +refs/heads/*:refs/remotes/origin/*
重启eclipse,再执行pull就没有问题了。