Skip to content

Commit 9a8b1bb

Browse files
authored
Add bulk-sign commands to retrospective-commit-signing.md
1 parent 63f7a81 commit 9a8b1bb

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

practices/guides/retrospective-commit-signing.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,16 @@ Please take the time to understand the commands that you are using, this is just
7575
Refresh the browser window for your PR. You should now see the verified commits:
7676

7777
![Updated commit history in GitHub](../../images/updated-commit-history-github.png)
78+
79+
### Optional process variation: bulk update last N commits in one command
80+
81+
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.
82+
83+
If N == 10:
84+
85+
```bash
86+
git rebase --exec "git commit -S --amend --no-edit" HEAD~10
87+
git push -f
88+
```
89+
90+
The first command automatically cycles through all 10 commits, signing each one. The second force-pushes the newly signed commits.

0 commit comments

Comments
 (0)