Last active
April 27, 2021 09:49
-
-
Save stepankuzmin/4eb603b6cf85da4446f7fa91a08d1816 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