Skip to content

Instantly share code, notes, and snippets.

@sidouglas
Created July 2, 2020 06:43
Show Gist options
  • Save sidouglas/37656f038d32471954293e00b0210207 to your computer and use it in GitHub Desktop.
Save sidouglas/37656f038d32471954293e00b0210207 to your computer and use it in GitHub Desktop.
Git squash command alias
[alias]
squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment