Skip to content

docs: add signing-commits guide to git workflow scenarios#115520

Open
lazizbekravshanov wants to merge 1 commit intofirstcontributions:mainfrom
lazizbekravshanov:docs/signing-commits-guide
Open

docs: add signing-commits guide to git workflow scenarios#115520
lazizbekravshanov wants to merge 1 commit intofirstcontributions:mainfrom
lazizbekravshanov:docs/signing-commits-guide

Conversation

@lazizbekravshanov
Copy link
Copy Markdown

Summary

Adds a beginner-friendly guide for signing commits, matching the style of the existing scenario guides.

Signing commits matters because Git's user.name / user.email are self-reported β€” nothing stops someone else from configuring Git with someone else's identity and pushing under that name. GitHub shows a green Verified badge next to commits it can cryptographically verify, and many projects (especially ones with release pipelines or security boundaries) now require signed commits. The repo's existing guides don't cover this.

Note on contribution workflow

.github/CONTRIBUTING.md says: "If you'd like to suggest a change in the tutorials or the workflow, please raise an issue. We can have a discussion to better understand the problem, get more people involved and make a collective decision."

Happy to close this PR and open an issue first if that's the maintainers' preferred flow for new content.

What the guide covers

The guide leads with SSH signing (recommended for beginners) because:

  • It's simpler than GPG β€” no keygen step, no pin-entry, no gpg-agent gotchas.
  • It reuses the SSH key most contributors already have set up for pushing to GitHub.
  • It's supported in Git 2.34+ (Nov 2021), which covers essentially every modern install.

GPG is covered as the secondary path for projects/employers that require it, including the classic GPG_TTY fix for pin-entry failing in a terminal.

Also covered:

  • Per-commit -S flag for when you don't want to sign everything.
  • git log --show-signature -1 for verification.
  • The commit-email gotcha β€” the signing email must match an email you've added (and verified) on your GitHub account, or the Verified badge doesn't appear.

Test plan

  • New file renders correctly in GitHub's markdown preview.
  • All commands verified locally against a GitHub account.
  • No internal links added that could break.

πŸ€– Generated with Claude Code

Add a beginner-friendly guide to signing commits:
- Explain *why* signing matters (Git identity is self-reported; signing
  proves authorship; GitHub shows a Verified badge).
- Lead with SSH signing, which reuses an existing GitHub SSH key and
  is the simplest path for new contributors (Git 2.34+).
- Cover GPG as a secondary path for projects/employers that require it.
- Show how to sign a single commit with -S when you don't want to sign
  everything.
- `git log --show-signature -1` for verification, plus the common
  GPG_TTY gotcha when pin-entry fails in a terminal.
- Note the commit-email requirement for GitHub to show Verified.

Index entry added to additional-material.md.

Interactive-rebase as a standalone guide was considered but skipped β€”
squashing-commits.md already covers the interactive-rebase mechanics
in the context where beginners most often hit them. Adding a second
guide would duplicate content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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