Last active
September 19, 2019 14:37
-
-
Save jasonmccreary/40b087c45945727f58261810a0ce929c to your computer and use it in GitHub Desktop.
Shell function to "fixup" and "autosquash" a commit with a single command.
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
# ref: https://twitter.com/gonedark/status/1174460639005356032 | |
# usage: fixup [ref] | |
function fixup() { | |
git commit --fixup="$1" | |
GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash "$1"~1 | |
} | |
# credit: https://stackoverflow.com/questions/29094595/git-interactive-rebase-without-opening-the-editor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment