]> git.phdru.name Git - dotfiles.git/blobdiff - .gitconfig
.gitconfig: add fixup alias
[dotfiles.git] / .gitconfig
index a5dd9706d03a62d005ce9909e998b0677aa7e4aa..583b9c78a429a97233731215da92f49ecfaa915b 100644 (file)
 
   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