diff options
| author | 2026-05-14 10:58:37 +0100 | |
|---|---|---|
| committer | 2026-05-14 10:58:37 +0100 | |
| commit | 74b3cb9b574b3e4a88020b1b3eb45fcfa4d448be (patch) | |
| tree | f74ceb947a132e9f0b6cdb5f5c048761eca279ed /dot_config/git | |
| parent | 9f640ed5db55594f8618d8809acb42a2d0d643ba (diff) | |
| download | dotfiles-74b3cb9b574b3e4a88020b1b3eb45fcfa4d448be.tar.gz dotfiles-74b3cb9b574b3e4a88020b1b3eb45fcfa4d448be.tar.bz2 dotfiles-74b3cb9b574b3e4a88020b1b3eb45fcfa4d448be.zip | |
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.
Diffstat (limited to 'dot_config/git')
| -rw-r--r-- | dot_config/git/config | 1 |
1 files changed, 1 insertions, 0 deletions
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 |
