Skip to content

Instantly share code, notes, and snippets.

@allinallin
Last active January 11, 2018 22:50
Show Gist options
  • Save allinallin/3c25e68bde57ef22915672e0549e95da to your computer and use it in GitHub Desktop.
Save allinallin/3c25e68bde57ef22915672e0549e95da to your computer and use it in GitHub Desktop.
Create a commit of staged changes and squash it with an existing commit in the stack
# $ git_fixup <SHA-1>
function git_fixup() {
git commit --fixup="${1}" && git rebase -i --autosquash "${1}"^
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment