From 74b3cb9b574b3e4a88020b1b3eb45fcfa4d448be Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Thu, 14 May 2026 10:58:37 +0100 Subject: feat(git): add resign alias Rebases onto @{u} re-signing each commit with the current author identity and key, while stripping any Co-authored-by lines. Hooks are disabled (core.hooksPath=/dev/null) so chezmoi's post-commit hook doesn't fire once per replayed commit. --- dot_config/git/config | 1 + 1 file changed, 1 insertion(+) diff --git a/dot_config/git/config b/dot_config/git/config index 9eae2c0..68f233e 100644 --- a/dot_config/git/config +++ b/dot_config/git/config @@ -86,6 +86,7 @@ [absorb] autoStageIfNothingStaged = true [alias] + resign = "!git -c core.hooksPath=/dev/null rebase @{u} --exec 'git log -1 --format=%B | sed \"/^Co-authored-by:/Id\" | git -c core.hooksPath=/dev/null commit --amend --reset-author --no-verify --cleanup=strip -F -'" ghost-rebase = "!sh -c 'b=$0; u=${1:-origin/master}; wt=$(mktemp -d -t rebwt.XXXXXX); git worktree add -f "$wt" "$b"; git -C "$wt" rebase "$u" || echo "Rebase incomplete"; git worktree remove --force "$wt"'" a = add ab=absorb --and-rebase -- cgit v1.3.1