Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: git checkout-index: unable to create file

What I am trying to do is a git clone on windows, but the parent repository exists in a unix machine.

Am cloning using ssh to get a clone from UNIX to windows, and I get this weird error.

error: git checkout-index: unable to create file <filename>

This happens during the checkout step of a git clone.

Can anyone help me?

like image 931
Senthil A Kumar Avatar asked Sep 10 '10 23:09

Senthil A Kumar


2 Answers

The answer should be:we can't create a file named aux.c in windows!

See http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx Do not use the following reserved device names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended. For more information, see Namespaces.

like image 57
Dexuan Avatar answered Nov 07 '22 13:11

Dexuan


Was your directory plus your filenames too long for Windows? I came across this problem once, and it was fixed when I tried cloning into a lower directory.

like image 7
Andrew Grimm Avatar answered Nov 07 '22 12:11

Andrew Grimm