qazwsx qazwsx - 4 months ago 10
Git Question

In a Git repository, how to properly rename a directory?

In a Git repository, how to properly rename a directory? 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?

Answer
git mv <old name> <new name>

followed by commit and push would be the simplest way.