我使用Dropbox
同步一个git
库,但现在当我尝试和push
,我得到一个错误:Git的致命:参考格式无效:“裁判/头/主
fatal: Reference has invalid format: 'refs/heads/master (MacBook-Pro's conflicted copy 2012-10-07)'
所以,似乎Dropbox检测到冲突并创建了一个副本。好吧,没问题,所以我删除了冲突的文件。尽管如此,仍然得到上面的git错误。
$ git checkout master
M index.html
Already on 'master'
$ git add .
$ git commit -a -m "Cleanup repo"
[master ff6f817] Cleanup repo
1 file changed, 5 insertions(+), 5 deletions(-)
$ git push
fatal: Reference has invalid format: 'refs/heads/master (MacBook-Pro's conflicted copy 2012-10-07)'
The remote end hung up unexpectedly`
我该如何解决这个问题?谢谢。
在原始文章中更新了输出。 – Justin
嗯,你可以试试一个完整的'git push origin master',并且粘贴'git branch -a'的输出吗? – poke
同样的错误在这里...尝试'git branch -a'导致这个错误! – trusktr