Rename files and folders with git
Renaming with git mv
git mv takes at least two arguments, a source and a destination.
It performs a file move, adds the new file to the index and removes the old file from it. |
If there’s already a newfolder in your repo and you’d like to overwrite it use –force
git mv -f oldfolder newfolder
Do not forget: you have to add the changes to the index and commit them after renaming with git mv.
git add -u newfolder
git commit -m "COMMENTS"
No comments