2015-06-03 92 views
0

我使用Git(從GitHub上的Windows發行版),並試圖從我的回購拉,我得到以下錯誤:錯誤:無法打開的.git/FETCH_HEAD:無效的參數

D:\Code\dopey-weaver [master]> git fetch 
error: cannot open .git/FETCH_HEAD: Invalid argument 

D:\Code\dopey-weaver [master]> git fetch --verbose 
error: cannot open .git/FETCH_HEAD: Invalid argument 

這ISN 「T在‘權限被拒絕’的其他許多問題,所以好像我是一個特別的雪花......我可以打開.git/FETCH_HEAD和它看起來罰款(?):

010779f14f5bdf1d2d806a0ce0ac4c5e50314186  branch 'master' of https://github.com/nicktimko/dopey-weaver 

我覺得我有一些衝突與遙控器上的東西,所以我應該拉/合併,但我甚至無法開始...推出錯誤消息看起來有點長(這是hg說:「這將創建多個頭」中沒有太多的言語相當於?)

D:\Code\dopey-weaver [master]> git push 
To https://github.com/nicktimko/dopey-weaver.git 
! [rejected]  master -> master (fetch first) 
error: failed to push some refs to 'https://github.com/nicktimko/dopey-weaver.git' 
hint: Updates were rejected because the remote contains work that you do 
hint: not have locally. This is usually caused by another repository pushing 
hint: to the same ref. You may want to first integrate the remote changes 
hint: (e.g., 'git pull ...') before pushing again. 
hint: See the 'Note about fast-forwards' in 'git push --help' for details. 
+0

可以試試'strace的混帳fetch' –

+0

--verbose不混帳的Ubuntu的版本的選項。你確定它在Windows下受支持嗎? – donjuedo

+0

@StevenPenny它給出了完全相同的錯誤,我只是試圖讓它可能吐出更多東西。 '--verbose'作爲一個選項出現在手冊頁 –

回答

1

的問題似乎是因爲體積(的exFAT的驅動器)是骯髒的,因此是隻讀的,需要通過chkdsk運行。因此,要解決:

  1. 啓動的PowerShell/CMD提升模式(簡單的方法是對短切在開始菜單中單擊鼠標右鍵,選擇「以管理員身份運行」)在
  2. 運行chkdsk所需的體積,例如chkdsk D: /X/X力下法)
    • 如果您有在主分區(C:)這個問題,你可能要在啓動時做chkdsk ......不知何故。