Require commit sign-off in the repo rules - #2778
Conversation
| git checkout -b feature/short-description`. | ||
| - **Sign off every commit** — `git commit -s`. The `DCO` check is required and fails the whole PR | ||
| on a single commit without a `Signed-off-by` trailer matching the commit author. To fix commits | ||
| already made: `git rebase --signoff origin/main`, then force-push. |
There was a problem hiding this comment.
[Improvement] Consider specifying git push --force-with-lease (instead of a generic “force-push”) after git rebase --signoff … to reduce the risk of overwriting someone else’s updates.
There was a problem hiding this comment.
Agreed, taken. --force-with-lease is what the repo already prescribes: the update-branch skill uses exactly that and explains why it beats plain --force, so a generic "force-push" here was the loose one.
Amended in 4b4f312.
There was a problem hiding this comment.
Thanks — the update to git push --force-with-lease after the sign-off rebase looks good. LGTM.
There was a problem hiding this comment.
Yep, perfect — git push --force-with-lease is the safer default after the sign-off rebase. Thanks for updating this in 4b4f312.
The DCO check is required and fails the whole PR on a single commit without a Signed-off-by trailer, which is easy to discover only after pushing. Says so in the Git Commits rules, with the flag and the recovery for commits already made. Signed-off-by: Harry Cruz <harry@rhesis.ai>
0c2a041 to
4b4f312
Compare
Purpose
DCOis a required check and it fails the whole PR on a single commit missing aSigned-off-bytrailer. Nothing in the repo rules says so, so the way to find out is to push four commits and watch the check go red. #2777 did exactly that.What Changed
AGENTS.md: sign off every commit withgit commit -s, why it matters, andgit rebase --signoff origin/mainto fix commits already made.Additional Context
main".AGENTS.mdis whatCLAUDE.mdimports and what Cursor reads natively, so the rule reaches both without duplicating it.Testing
Documentation only, no code paths touched. The rule is verifiable against this PR: its own commit carries the trailer and
DCOpasses.