From a5e91b70ab07cf978e2c27aab5c662299a45303a Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 8 Jul 2021 12:25:08 +0200 Subject: [PATCH] Restrict git fixup to edited files in last commit By default, git fixup will now only consider files that have been edited in the last commit. Other files can still be added manually by simply listing them on the commandline. --- gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index 726835d..8434467 100644 --- a/gitconfig +++ b/gitconfig @@ -24,7 +24,7 @@ stat = log --oneline --stat --date-order identity = "! git config user.name \"$(git config user.$1.name)\"; git config user.email \"$(git config user.$1.email)\"; :" root = rev-parse --show-toplevel - fixup = commit --patch --no-edit --amend + fixup = "!git commit --patch --no-edit --amend $(git diff --name-only HEAD~1..HEAD)" ts = timeshift task = "! TASKDATA=$(git rev-parse --show-toplevel)/.git/task task" track = add --intent-to-add