Skip to content

Instantly share code, notes, and snippets.

@rfuehrer
Created February 23, 2020 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rfuehrer/1ff049072713f8489247e05506f4224e to your computer and use it in GitHub Desktop.
Save rfuehrer/1ff049072713f8489247e05506f4224e to your computer and use it in GitHub Desktop.
Squash all Git commits with git squash-all
# source: https://www.bram.us/2020/01/16/squash-all-git-commits-with-git-squash-all/
git config --global alias.squash-all '!f(){ git reset $(git commit-tree HEAD^{tree} -m "${1:-🎉 First commit}");};f'
git squash-all
git push --force origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment