Skip to content

Instantly share code, notes, and snippets.

@SantoshCode
Created November 11, 2021 12:39
Show Gist options
  • Save SantoshCode/52bdd72461c4d34393003916ae3b050d to your computer and use it in GitHub Desktop.
Save SantoshCode/52bdd72461c4d34393003916ae3b050d to your computer and use it in GitHub Desktop.
Change latest commit message

Steps to change latest commit message

$ git commit --amend -m "New message"
$ git push --force repository-name branch-name

example,

$ git commit --amend -m "New message"
$ git push --force git@github.com:<username>/<reponame>.git master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment