Skip to content

Instantly share code, notes, and snippets.

@jasonmccreary jasonmccreary/fixup.sh
Last active Sep 19, 2019

Embed
What would you like to do?
Shell function to "fixup" and "autosquash" a commit with a single command.
# 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
You can’t perform that action at this time.