Git reset --hard Not Working: File System Is Not Case Sensitive
git reset --hard
not working: everytime you reset, the
file is flipped between file.txt
and File.txt
,
really weird...
It's not a joke, just clone this repo on Windows and you can reproduce it:
D:\$ git clone https://github.com/finisky/git-case-demo.git
Cloning into 'git-case-demo'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 11 (delta 0), reused 8 (delta 0), pack-reused 0
Unpacking objects: 100% (11/11), 1.85 KiB | 126.00 KiB/s, done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:
'File.txt'
'file.txt'
After clone the repo, you will find that the main
branch
is not clean. git reset --hard
not working: