[英]Git, Windows, Linux & NTFS: “index file open failed”
I created a git repo in Windows 7 on a NTFS partition and when opening it in Linux (Ubuntu 12 x64, dual-boot setup) I get the index file open failed
error. 我在Windows 7中的NTFS分区上创建了一个git repo,在Linux中打开它(Ubuntu 12 x64,双启动安装)时,出现
index file open failed
错误。 How can I figure out what's wrong? 我如何找出问题所在? The partition is mounted read-write and I've never had any other problems.
该分区是读写安装的,我再也没有其他问题。 Does git store data in a different format Windows vs. Linux and I need to do either a clone or some conversion?
git是否以Windows和Linux不同的格式存储数据,我是否需要克隆或进行某些转换? I'd really like to be able to work on the same repo in both OSs without cloning around...
我真的很希望能够在两个操作系统中都可以在同一个仓库中工作而无需克隆...
Clarification: I also get cat: index: Input/output error
when running the command cat index
in the .git dir, so it is a NTFS related problem... but I've never had it before untill using git in a cross-systems way and I've run other apps from NTFS parts and copied files around... 澄清:我也得到
cat: index: Input/output error
在.git dir中运行命令cat index
时cat: index: Input/output error
,所以这是一个与NTFS相关的问题...但是我从来没有遇到过,直到在跨平台中使用git为止。系统方式,我已经从NTFS部件运行其他应用程序,并在周围复制了文件...
The .git/index
file is a binary file, which describes the current workdir. .git/index
文件是一个二进制文件,它描述当前的工作目录。 Perhaps a git fsck
is able to fix it up (move the one you have out of the way to make sure it isn't lost while you fool around, or make any expertiments on a copy of the repository). 也许
git fsck
可以修复它(将其移开,以确保它不会在您四处闲逛时丢失,或者在存储库的副本上提供任何专业知识)。 You might try to clone the repository locally, the clone might get a good copy of the file, which you could then copy over the broken one. 您可以尝试在本地克隆存储库,克隆可能会获得文件的良好副本,然后可以将其复制到损坏的副本上。
Possibly permission problems? 可能是权限问题? Backup what is relevant, defragment the drive, run hardware checks (it might be a broken/breaking disk!).
备份相关内容,对驱动器进行碎片整理,运行硬件检查(它可能是损坏的/损坏的磁盘!)。
Either your Linux NTFS driver is broken, or you have filesystem corruption, or both. 您的Linux NTFS驱动程序已损坏,或者文件系统已损坏,或者两者都有。 Reboot to Windows and run the disk checking utility, then see how things stand when it finishes.
重新启动至Windows并运行磁盘检查实用程序,然后查看完成后的状况。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.