To rename a folder from oldName
to newName
git mv directoryToFolder/oldName directoryToFolder/newName
Followed by git commit
and/or git push
If this error occurs:
fatal: renaming 'directoryToFolder/oldName' failed: Invalid argument
Use the following command:
git mv directoryToFolder/oldName temp && git mv temp directoryToFolder/newName