-
-
Save saiury92/43487a9e76f4fd4c80479148f45b75c6 to your computer and use it in GitHub Desktop.
Git alias for squashing last N commits into it's parents
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
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