0 votes
1 view
in DevOps and Agile by (20k points)
edited by

I think it should work to copy the directory to be renamed to a new directory with desired name, and delete the old directory, and git add git commit and push everything. But is this the best way?

1 Answer

0 votes
by (28.4k points)

This command should do the magic:

$ git mv <old name> <new name>

Additional info, case sensitive renaming —eg. from newname to NewName:

Follow these steps:

$ git mv newname tmp

$ git mv tmp NewName

Remember this has to be followed by commit and push.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !