我正在使用Git(来自GitHub for Windows发行版)并尝试从我的回购中提取并出现以下错误:
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
这不是"权限被拒绝"还有许多其他问题,所以看起来我是一个特殊的雪花...我可以打开.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 :(得分:1)
问题似乎是因为卷(exFAT驱动器)很脏,因此是只读的,需要通过chkdsk
运行。所以,要解决:
chkdsk
,例如chkdsk D: /X
(/X
迫使下马)
C:
)上遇到此问题,那么您可能必须在启动时chkdsk
以某种方式执行此操作。