2015-06-03 93 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 ......不知何故。