Skip to content

Instantly share code, notes, and snippets.

@saiury92
Forked from stepankuzmin/fixup.sh
Created April 27, 2021 09:49
Show Gist options
  • Save saiury92/43487a9e76f4fd4c80479148f45b75c6 to your computer and use it in GitHub Desktop.
Save saiury92/43487a9e76f4fd4c80479148f45b75c6 to your computer and use it in GitHub Desktop.
Git alias for squashing last N commits into it's parents
git config --global alias.fixup "\!f(){ git reset --soft HEAD~${1} && git commit --amend -C HEAD; };f"
git fixup 1 # squashes last commit into it's parent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment