简体   繁体   中英

Git weird deletion issue on Windows

The most of the work done in project was done on Linux platform, but now I'm trying to setup a clone on Windows platform.

The problem is that upon git clone a file foo.bar appears to be immediately deleted (and marked so in uncommited changes).

Checking git ls-files shows that file foo.bar is present in index.

I did some research and noticed the following chronology:

Commit# .... Status

100 .... Current HEAD

45 .... foo.bar modified (by me)

44 .... foo.bar deleted (by rookie teammate who never saw git before)

25 .... foo.bar modified (by me)

24 .... foo.bar created (by me)

I currently have no idea what I was doing to restore the file in commit #44. But I guess I did git checkout commit43 -- foo.bar , I might have done something else somewhere else, but I have no idea what really happened.

Currently the repository on Windows platform will not let me checkout the file foo.bar . Deleting repository and re-cloning results in the state I mentioned above.

On Linux platforms however, clone works 'perfectly' ie the file is there.

Please help me understand what went wrong and how to fix this.

EDIT:

For the record. The original filename is called aux.py and its a Windows issue.

You cannot create files named aux.* on windows. The easiest solution is to rename the file and clone the repository again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM