Skip to content

docs(git-workflow): DCO sign-off, force-with-lease pinning, -F commit messages#49

Merged
CybotTM merged 1 commit into
mainfrom
docs/retro-dco-lease-msg-gotchas
Jun 2, 2026
Merged

docs(git-workflow): DCO sign-off, force-with-lease pinning, -F commit messages#49
CybotTM merged 1 commit into
mainfrom
docs/retro-dco-lease-msg-gotchas

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented Jun 2, 2026

Summary

Three small additions, each from a retrospective where the missing guidance caused real rework on a live PR:

  1. SKILL.md — make DCO sign-off discoverable. The git commit -S --signoff rule lives in commit-conventions.md, but the SKILL.md references table didn't list it as a trigger, so the reference wasn't loaded at commit time — the commits failed the DCO check after push and had to be amended + force-pushed on two repos. Added "DCO sign-off" to the commit-conventions.md trigger row (SKILL.md stays within its 500-word cap).
  2. pull-request-workflow.md--force-with-lease "stale info" on bot-active PRs. When an auto-approve/Renovate bot updates the remote branch between fetch and push, a plain --force-with-lease is (correctly) rejected. Documents the fix: re-read the head and pin the lease to a git ls-remote SHA rather than escalating to --force.
  3. commit-conventions.md — multi-line/special-char messages via -F. An inline -m body containing "/& is mangled by the shell (string closes early, & backgrounds). Recommends -F - with a quoted heredoc.

Test plan

  • Additions are doc-only and additive
  • SKILL.md ≤ 500 words (498)
  • No new markdownlint findings (pre-existing footer bare-URL in SKILL.md is unchanged)

Copilot AI review requested due to automatic review settings June 2, 2026 10:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Doc-only additions to the git-workflow skill that surface three pieces of guidance which previously caused rework: DCO sign-off at the entry point, handling --force-with-lease "stale info" rejections on bot-active PRs, and using -F - with a heredoc for multi-line/special-char commit messages.

Changes:

  • Add a prominent git commit -S --signoff rule to SKILL.md Conventional Commits section.
  • Document the --force-with-lease stale-info workaround (pin lease to a git ls-remote SHA) in pull-request-workflow.md.
  • Recommend -F - with a quoted heredoc for multi-line/special-char bodies in commit-conventions.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
skills/git-workflow/SKILL.md Surfaces -S --signoff requirement directly in the entry-point Conventional Commits block.
skills/git-workflow/references/pull-request-workflow.md Adds a subsection explaining how to safely recover from --force-with-lease "stale info" without escalating to --force.
skills/git-workflow/references/commit-conventions.md Adds guidance and an example for using -F - heredoc to avoid shell mangling of commit bodies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Git workflow documentation to include guidelines on signing commits, avoiding inline multi-line commit messages, and handling --force-with-lease rejections. The review feedback highlights several technical and logical inaccuracies in the proposed additions: it clarifies that the DCO check requires the commit author identity to match the Signed-off-by: trailer, corrects the explanation of shell parsing behavior for inline commit messages, and points out a logical contradiction in the --force-with-lease workaround, suggesting a safer fetch-and-inspect workflow instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread skills/git-workflow/SKILL.md Outdated
Comment thread skills/git-workflow/references/commit-conventions.md Outdated
Comment thread skills/git-workflow/references/pull-request-workflow.md Outdated
@CybotTM CybotTM force-pushed the docs/retro-dco-lease-msg-gotchas branch 2 times, most recently from a329eb4 to 12e2d97 Compare June 2, 2026 11:35
…F messages

Three additions from a retrospective where each cost real rework on a PR:

- SKILL.md: surface `git commit -S --signoff` in the Conventional Commits block.
  The DCO/sign-off rule lived only in commit-conventions.md, so it was missed at
  commit time even with the skill loaded — failing DCO after push and forcing an
  amend + force-push.
- pull-request-workflow.md: document the `--force-with-lease` "stale info"
  rejection on bot-active PRs (auto-approve, Renovate) and the fix — pin the lease
  to a freshly-read `git ls-remote` SHA rather than escalating to --force.
- commit-conventions.md: warn that multi-line / special-char commit bodies passed
  inline via `-m` are mangled by the shell (embedded quotes close the string, `&`
  backgrounds); use `-F -` with a quoted heredoc instead.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@CybotTM CybotTM force-pushed the docs/retro-dco-lease-msg-gotchas branch from 12e2d97 to 9143789 Compare June 2, 2026 11:38
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

@CybotTM CybotTM merged commit e63589b into main Jun 2, 2026
17 checks passed
@CybotTM CybotTM deleted the docs/retro-dco-lease-msg-gotchas branch June 2, 2026 11:47
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.

2 participants