Skip to content

Require commit sign-off in the repo rules - #2778

Merged
harry-rhesis merged 1 commit into
mainfrom
docs/agents-md-signoff
Sep 19, 2026
Merged

harry-rhesis merged 1 commit into
mainfrom
docs/agents-md-signoff

Conversation

@harry-rhesis

Copy link
Copy Markdown
Contributor

Purpose

DCO is a required check and it fails the whole PR on a single commit missing a Signed-off-by trailer. 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

  • One bullet in the Git Commits section of AGENTS.md: sign off every commit with git commit -s, why it matters, and git rebase --signoff origin/main to fix commits already made.

Additional Context

  • Placed next to the other hard commit rules, so it is read at the same time as "never commit on main".
  • AGENTS.md is what CLAUDE.md imports 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 DCO passes.

@peqy peqy Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs change matches the stated goal and is placed in the right spot.

Found 1 issue (0 critical, 1 improvement).

Comment thread AGENTS.md Outdated
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — the update to git push --force-with-lease after the sign-off rebase looks good. LGTM.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@harry-rhesis
harry-rhesis merged commit 4dd0693 into main Sep 19, 2026
14 checks passed
@harry-rhesis
harry-rhesis deleted the docs/agents-md-signoff branch September 19, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant