0 votes
1 view
in Devops and Agile by (16.9k 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 (22.3k 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.

...