Renaming Files in Git
To rename files in Git, use the mv
command. We specify the old file name and the new name in the following order:
git mv old.txt new.txt
After checking the status of the files, a message about renaming the file will be displayed in the terminal:
Changes to be committed:
renamed: old.txt -> new.txt
Rename some file in your repository.