From 63873fcccf8733eb265e27a2dc9b5f379e3212f5 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 19 Nov 2024 20:24:49 +0100 Subject: [PATCH] Update git reauthor-all alias (retain commit dates) --- home/.config/git/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/.config/git/config b/home/.config/git/config index d89f398..2e69ed9 100644 --- a/home/.config/git/config +++ b/home/.config/git/config @@ -71,7 +71,7 @@ staash = "stash --all"; stash-staged = "!sh -c 'git stash --keep-index; git stash push -m \"staged\" --keep-index; git stash pop stash@{1}'" - reauthor-all = "rebase --root -r --exec 'git commit --amend --no-edit --reset-author --no-verify'"; + reauthor-all = "-c rebase.instructionFormat='%s%nexec GIT_COMMITTER_DATE=\"%cD\" GIT_AUTHOR_DATE=\"%aD\" git commit --amend --no-edit --no-verify --reset-author' rebase --root" find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'" show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"