Skip to main content

Why Commit Messages Matter

When you push to gitGost, your commit message becomes the PR description. Since you’re contributing anonymously, you can’t edit the PR or add comments to provide context—the commit message is your only voice.
Your commit message is the only way to explain your changes to maintainers. Make it clear, detailed, and professional.

Commit Message Anatomy

A well-structured commit message has three parts:

Example

This becomes the PR description:
Anonymous contribution via gitGost
fix: correct API timeout handling in HTTP client The previous timeout of 5 seconds was too short for slow networks, causing unnecessary request failures. This commit increases the timeout to 30 seconds and adds exponential backoff for retries. Tested with simulated network delays of 10-25 seconds. Fixes issue with API calls failing on 3G connections.

This is an anonymous contribution made via gitGost.

The First Line: Short Summary

The first line is critical—it appears in:
  • Git logs
  • GitHub PR titles
  • Email notifications
  • Commit lists

Best Practices

1

Use a type prefix

Start with a conventional commit type:
  • feat: - New feature
  • fix: - Bug fix
  • docs: - Documentation only
  • style: - Formatting, whitespace
  • refactor: - Code restructuring
  • test: - Adding/updating tests
  • chore: - Build, dependencies
2

Keep it under 50 characters

GitHub truncates long summaries:
Use git log --oneline locally to preview how your summary appears.
3

Use imperative mood

Write as if commanding the codebase:
Think: “This commit will add validation…”
4

Don't end with a period

The Body: Detailed Explanation

After a blank line, write a detailed explanation:

What to Include

Explain why this change is necessary:
Describe testing steps:
Mention limitations:

Format Guidelines

  • Wrap at 72 characters per line
  • Use blank lines between paragraphs
  • Use bullet points for lists
  • Be specific, not vague

Examples: Good vs. Bad

Example 1: Bug Fix

Example 2: New Feature

Example 3: Documentation

Anonymous Contribution Tips

Since you’re contributing anonymously, avoid revealing your identity:

❌ Don’t Include

  • Personal names or usernames
  • Company names or projects
  • Email addresses
  • Timezone references (“I pushed this at 3am”)
  • Personal anecdotes (“This always annoys me”)

✅ Do Include

  • Technical rationale
  • Objective testing results
  • Links to public documentation
  • Neutral language

Bad Example (Reveals Identity)

Problems:
  • Mentions company name (“AcmeCorp”)
  • Uses “I” and “me” (personal)
  • References internal systems

Good Example (Anonymous)

Why it works:
  • No personal pronouns
  • No company/project references
  • Objective, technical description
  • References public documentation

Multi-Line Commit Messages

To write multi-line messages, use an editor:
Or use multiple -m flags:
Or use a heredoc:

Commit Message Template

Create a template file ~/.gitmessage:
Then configure Git to use it:
Now git commit opens with this template.

Linking to Issues

If the repository has a public issue tracker, you can reference issues:
GitHub will automatically close issue #1234 when the PR is merged if you use keywords like Fixes, Closes, or Resolves.

Multiple Commits

If pushing multiple commits, each commit message should be clear:
All three messages appear in the PR—don’t rely on only the last commit being descriptive.

Reviewing Your Message

Before pushing, review your commit message:
Ask yourself:
  • Is the summary under 50 characters?
  • Does it explain why, not just what?
  • Would a maintainer understand without context?
  • Does it avoid personal/company information?
  • Is it professional and respectful?
If yes to all, you’re good to push!

Common Mistakes

Too Vague

Too Detailed (in summary)

No Context

Best Practices Summary

Be Specific

Explain what changed and why. Avoid vague summaries like “fix bug” or “update code.”

Be Concise

Keep the summary under 50 characters. Save details for the body.

Be Anonymous

Avoid personal pronouns (I, we, our) and company references. Use neutral, technical language.

Be Professional

Write respectfully. You’re asking maintainers to accept your code—make it easy for them.

Tools and Resources

Commit Message Linters

Use tools to enforce good commit messages:

Style Guides

Examples from Real Projects

Linux Kernel

Node.js

Next Steps

Basic Usage

Learn the fundamentals of using gitGost

Anonymous Push

Understand how metadata is stripped

Tor Integration

Hide your IP address with Tor

Threat Model

Understand anonymity guarantees