Check in and Push Renamed File into Git Repository in Terminal on Mac - VicPhanDevOps/mac GitHub Wiki

• Browse to the file you wish to rename in the Finder, click twice on it, type the new name and press return key.
image

• Right-click on the local repository, expand the “Services” menu and select “New Terminal at Folder.”
image

• Type git status and press the return key to see changes that are waiting to be staged.
image

• Type git rm --cache < old filename > and press the return key to remove the old filename from the cache.
image

• Type git add < new filename > and press the return key to stage the new filename.
image

• Type git commit -m “< commit message >” and press the return key to commit the change with a commit message.
image

• Type git push and press the return key to push the changes to the remote Git repository.
image

⚠️ **GitHub.com Fallback** ⚠️