💻 Software
Can you GPG sign old commits?
Fresh5 days ago
Mar 15, 2026169332 viewsConfidence Score1%
1%
Problem
Git now has the ability to sign commits with , which is great, but sometimes I forget the flag to , and sometimes I mail myself patches which I apply with , and that command doesn't have a flag for signing. Is there a way to add a signature to an already recorded commit?
Error Output
git commit -S
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Can you GPG sign old commits?
Low Risk
Go into interactive rebase mode. Add the following line after each commit you want to sign This will run this command after picking each commit. UPDATE: Easier way to do this is: This rebases everything till development (or any hash) and you don't have to copy paste after every commit.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix