Created
February 23, 2020 19:21
-
-
Save rfuehrer/1ff049072713f8489247e05506f4224e to your computer and use it in GitHub Desktop.
Squash all Git commits with git squash-all
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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