Categories
Git KeepRemaindingMe

Folder rename in Git

Git can’t detect directory name change. For example rename an existing folder to “Dashboard” from “DashBoard”. Even if we rename the folder name from the directory but git will still not detect the change. Here is the git command to make it work for rename

git mv oldname newname 

For the above example it will not work since it’s case sensitive, to rename a case sensitive name, follow the below commands

git mv DashBoard temp
git mv temp Dashboard

We need to rename to a temporary folder and then rename to intendent folder name.

Happy Coding 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *