我使用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