git

Rename folder to lowercase - Git

prayatna

Prayatna Bhattarai

Posted on January 28, 2021

Rename folder to lowercase - Git

We are always having issues renaming a folder to lower case because git does not tend to understand the difference even if we change the folder.

The way we would rename is:

First move the folder to another temp. folder

git mv src/Home src/homes
Enter fullscreen mode Exit fullscreen mode

Then move the folder to the desired folder name:

git mv src/homes src/home
Enter fullscreen mode Exit fullscreen mode

Finally commit the change

git commit -m "rename folder from Home to home
Enter fullscreen mode Exit fullscreen mode

If you are running windows, the rename may not reflect on the windows explorer so we follow similar approach. -> rename to temp folder and rename it back again

Rename-Item Home homes
Enter fullscreen mode Exit fullscreen mode

commit the changes and again run

Rename-Item homes home
Enter fullscreen mode Exit fullscreen mode

and finally push your changes.

We run webpack so sometimes it caches the build so have to run a build for prod and then again switch back to the local dev build.

💖 💪 🙅 🚩
prayatna
Prayatna Bhattarai

Posted on January 28, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related