Gitamic
SupportPurchase
  • πŸ‘‹Hi, Gitamic!
  • πŸš€Release notes
  • πŸ’³Purchase a license
  • πŸ›£οΈRoadmap
  • Getting Started
    • πŸ’ΎInstallation
    • πŸŽ›οΈSetup
    • πŸ›³οΈDeployment
  • Using Gitamic
    • ℹ️Git basics
    • β˜‘οΈReviewing changes
    • ⏺️Creating commits
      • Writing commit messages
      • Atomic commits
    • πŸ”ƒPushing & pulling
  • Legal, Security, Support
    • πŸ§‘β€βš–οΈLicense agreement
    • πŸ”Security policy
    • 🐞Report an issue
    • πŸ› οΈFeature requests
  • πŸ™ŠAbout me
Powered by GitBook
On this page
  • Separate subject from body with a blank line
  • Limit the subject line to 50 characters
  • Capitalize the subject line
  • Do not end the subject line with a period
  • Use the imperative mood in the subject line
  • Use the body to explain what and why vs. how

Was this helpful?

Edit on GitHub
  1. Using Gitamic
  2. Creating commits

Writing commit messages

How to write clear and concise commit messages

PreviousCreating commitsNextAtomic commits

Last updated 1 year ago

Was this helpful?

A lot of this page is inspired by and adapted from by cbeams.

A well-cared for log is a beautiful and useful thing.

[Good committers] know that a well-crafted Git commit message is the best way to communicate context about a change to fellow developers (and indeed to their future selves)

β€”

These are just some useful guidelines, not rules.

Separate subject from body with a blank line

Not every commit requires both a subject and a body. If the subject is enough, it's enough.

But when you do need to provide more detail, separate the subject from the body with a blank line.

Here's the subject

And here's the body that goes into a lot more detail.

Limit the subject line to 50 characters

This isn't a rule, but it encourages you to be concise. It also means that the subject will be presented nicely in most places without being trimmed.

Capitalize the subject line

Readability starts with first principles, but...

Do not end the subject line with a period

Every character counts when you're being concise.

Use the imperative mood in the subject line

Write like you're commanding someone to do something, not past tense expressing what you did.

Use the body to explain what and why vs. how

This is possibly the most important recommendation!

When committing many changes, you should focus on giving context on what has changed and why it was needed, and less on how.

For most content changes this probably won't be a major concern, but if your changes cover code, then the how can usually be found by reading the changes in the code; what may be less obvious from the code is what changed and why.

⏺️
this fantastic post
cbeams, 2014