From 9a8b1bb97b0d05037d52323ee33b00a3ef5f02e3 Mon Sep 17 00:00:00 2001 From: andyblundell Date: Tue, 10 Feb 2026 15:15:06 +0000 Subject: [PATCH 1/3] Add bulk-sign commands to retrospective-commit-signing.md --- practices/guides/retrospective-commit-signing.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/practices/guides/retrospective-commit-signing.md b/practices/guides/retrospective-commit-signing.md index b29141fa..fa88f0af 100644 --- a/practices/guides/retrospective-commit-signing.md +++ b/practices/guides/retrospective-commit-signing.md @@ -75,3 +75,16 @@ Please take the time to understand the commands that you are using, this is just Refresh the browser window for your PR. You should now see the verified commits: ![Updated commit history in GitHub](../../images/updated-commit-history-github.png) + +### Optional process variation: bulk update last N commits in one command + +If you are happy that the most recent N commits can *all* be signed in one go, that's possible in fewer steps than the method above, but is less flexible: you can't pick and choose which commits this acts on, so this won't always be an appropriate method. + +If N == 10: + +```bash +git rebase --exec "git commit -S --amend --no-edit" HEAD~10 +git push -f +``` + +The first command automatically cycles through all 10 commits, signing each one. The second force-pushes the newly signed commits. From 1fa416565636114aac665fa4c532fe6d75d46b9f Mon Sep 17 00:00:00 2001 From: andyblundell Date: Tue, 10 Feb 2026 15:15:52 +0000 Subject: [PATCH 2/3] Update retrospective-commit-signing.md --- practices/guides/retrospective-commit-signing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/practices/guides/retrospective-commit-signing.md b/practices/guides/retrospective-commit-signing.md index fa88f0af..af1ae17a 100644 --- a/practices/guides/retrospective-commit-signing.md +++ b/practices/guides/retrospective-commit-signing.md @@ -76,7 +76,7 @@ Please take the time to understand the commands that you are using, this is just ![Updated commit history in GitHub](../../images/updated-commit-history-github.png) -### Optional process variation: bulk update last N commits in one command +### Optional process variation: bulk update last N commits If you are happy that the most recent N commits can *all* be signed in one go, that's possible in fewer steps than the method above, but is less flexible: you can't pick and choose which commits this acts on, so this won't always be an appropriate method. From d3741ffd6a7b1994301574e8669ff022077e3392 Mon Sep 17 00:00:00 2001 From: andyblundell Date: Tue, 10 Feb 2026 17:45:25 +0000 Subject: [PATCH 3/3] Update retrospective-commit-signing.md --- practices/guides/retrospective-commit-signing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/practices/guides/retrospective-commit-signing.md b/practices/guides/retrospective-commit-signing.md index af1ae17a..7c78ce21 100644 --- a/practices/guides/retrospective-commit-signing.md +++ b/practices/guides/retrospective-commit-signing.md @@ -83,8 +83,10 @@ If you are happy that the most recent N commits can *all* be signed in one go, t If N == 10: ```bash -git rebase --exec "git commit -S --amend --no-edit" HEAD~10 +git rebase --exec "git commit -S --amend --no-edit --allow-empty" HEAD~10 git push -f ``` The first command automatically cycles through all 10 commits, signing each one. The second force-pushes the newly signed commits. + +Note: --allow-empty is only needed if any of the commits you want to sign are empty.