Skip to content

Instantly share code, notes, and snippets.

@MarkyMarkMcDonald
Last active March 5, 2019 21:01
Show Gist options
  • Save MarkyMarkMcDonald/b17645e7f23969c6c528a8d222d4ec4e to your computer and use it in GitHub Desktop.
Save MarkyMarkMcDonald/b17645e7f23969c6c528a8d222d4ec4e to your computer and use it in GitHub Desktop.
Amending to an old commit
amend-ng () {
 SHA=$1
 git commit --fixup $SHA &&
 GIT_EDITOR="cat" git rebase --autosquash --interactive $SHA^
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment