I develop a project in IntelliJ IDEA and use Git as a VCS. I have a package "currencies" in IDEA, but it is called "Currencies" in Git.
Somehow Git understands that it is the same folder, but IDEA doesn't. This mismatch creates lots of problems. How can I make this folder be name identically in Git and IDEA?
Tell Git to explicitly rename a directory.
Try with
-n
key to see what will be the result. Use*
in the source path argument and not in the destination.Once everything is as you want, run the same without
-n
:Now checkout any other revision and then this one again. The folder should be renamed to lowercase.
An example with original paths from the question:
Preparing an example:
Now we've got path
src/Currencies
tracked by Git. And we want to rename it.Git has tracked the rename (but it will not rename the folder in working tree yet).
Now checkout to some other revision and back:
We can see that folder is successfully renamed: