Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.4k 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 (27.5k 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.

Browse Categories

...