Skip to content

Instantly share code, notes, and snippets.

@zzlalani
Last active August 29, 2015 13:58
Show Gist options
  • Save zzlalani/10018687 to your computer and use it in GitHub Desktop.
Save zzlalani/10018687 to your computer and use it in GitHub Desktop.
Edit the pushed commit message
1. git rebase -i <hash-of-commit-preceding-the-incorrect-one>
2. In the editor that opens, change pick to reword on the line for the incorrect commit.
3. Save the file and close the editor.
4. The editor will open again with the incorrect commit message. Fix it.
5. Save the file and close the editor.
6. git push --force to update GitHub.
Originally taken from http://stackoverflow.com/a/5032614/829533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment