msysgit / git

msysGit-based Git for Windows 1.x is now superseded by Git for Windows 2.x
http://github.com/git-for-windows/git
Other
1.01k stars 316 forks source link

Msysgit considers all files deleted from index #344

Closed einmalfel closed 9 years ago

einmalfel commented 9 years ago

Hello!

I've got following problem trying to use git on windows with one of my github repositories (for other repos it works fine): After cloning repo, git status shows all files are both deleted and untracked while files are actually present on file system. I have also noticed (not sure this is relevant) that file .git/index is absent. Git reset says:

$git reset --hard
error: unable to create file thingitwrapper_package/thingitwrapper/aux.py (No such file or directory)
fatal: Could not reset index file to revision 'HEAD'.

The repository (https://github.com/einmalfel/git-aflow) doesn't contain files with names longer than 260 chars, nor it contains files with non-ASCII names.

Problem was reproduced with two git builds:

dscho commented 9 years ago

.../aux.py (No such file or directory)

The name aux is not allowed as file name on NTFS. I am sorry, there is nothing Git can do about that...

aConsciousSea commented 9 years ago

I'm not sure why this file would have been an attempted add...I performed no such request...is this an issue?

linquize commented 9 years ago

With filenames aux, that's why I cannot checkout the source code of linux kernel on Windows.

einmalfel commented 9 years ago

O, really?? I knew this Windows is a weird thing! Thanks for clarification and sorry for disturbance! Closing the issue..

dscho commented 9 years ago

You might be able to work around this as discussed in this thread, i.e. using sparse checkout or pre-editing of the Git index to avoid invalid filenames.

If you are successful with that strategy, a document on https://github.com/git-for-windows/git/wiki to describe it would be much appreciated.