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?
Question
Answer
Basic rename (or move):
git mv <old name> <new name>
Case sensitive rename—eg. from casesensitive to CaseSensitive—you must use a two step:
git mv casesensitive tmp
git mv tmp CaseSensitive
(More about case sensitivity in Git…)
…followed by commit and push would be the simplest way to rename a directory in a git repo.