Git – Quick Tips

Amend Last Commit Message

git commit --amend -m "New commit message"

Clean up any untracked files

Preview what’s to be deleted
git clean -n
Remove the untracked files from your workspace
git clean -f

Revert the workspace to the last committed state

git reset --hard

Leave a Reply

Your email address will not be published. Required fields are marked *