Change case of a file on Windows?
Have a look here for more hints on how to do it:
How to make git ignore changes in case?
Or:
git mv -f name.java Name.java
If you are on a FAT file system your only choice is to do a two stage rename:
- Rename
sourceCode.java
toanything.you.like
- Rename
anything.you.like
toSourceCode.java
Back in the days when we used Perforce we had exactly this problem and this was the only solution we could come up with.
The following steps allowed me to change the case on Windows:
- Add
ignorecase = false
to[core]
in.git/config
; - Move the files you are going to rename out of your project directory;
- Add the deletes to the index;
- Move all files back to their original location and change the case of the files and/or directories;
- Add all "new" files to the index;
- Remove
ignorecase = false
added at the first step.
This way you have a single commit that contains the rename and it makes it easy to change e.g. an entire directory.