From: Oleg Broytman Date: Thu, 21 Jul 2016 15:30:36 +0000 (+0300) Subject: .gitconfig: add fixup alias X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=f01a4cf48d7dd6940dfef1be14cec47a521c02b9;p=dotfiles.git .gitconfig: add fixup alias --- diff --git a/.gitconfig b/.gitconfig index a5dd970..583b9c7 100644 --- a/.gitconfig +++ b/.gitconfig @@ -66,6 +66,10 @@ rbs = rebase --skip + # See https://blog.filippo.io/git-fixup-amending-an-older-commit/ + # This is a slightly modified version + fixup = "!f() { TARGET=$(git rev-parse \"$1\"); git commit --fixup=$TARGET && GIT_EDITOR=true git rebase --interactive --autosquash $TARGET~; }; f" + ### remote ### rs = remote show