How to Write a Git Commit Message


172 bookmarks. First posted by loki february 2017.


I should probably revisit this post on crafting good git commit messages periodically
Coding  commits  Git 
6 days ago by brianhoch
on git commit messages
git  productivity  collaboration 
16 days ago by jshwlkr
The contributors to these repositories 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). A diff will tell you what changed, but only the commit message can properly tell you why.
git  devstandards  development  bestpractices 
11 weeks ago by mhick
If you browse the log of any random Git repository, you will probably find its commit messages are more or less a mess. For example, take a look at from my early days committing to Spring: Which would you rather read? via Pocket
IFTTT  Pocket  git  work 
january 2018 by judeopiston
31 Aug 2014 | revision history | | Introduction: Why good commit messages matter If you browse the log of any random Git repository, you will probably find its…
from instapaper
january 2018 by divigation
A project’s long-term success rests (among other things) on its maintainability, and a maintainer has few tools more powerful than his project’s log. It’s worth taking the time to learn how to care for one properly. What may be a hassle at first soon becomes habit, and eventually a source of pride and productivity for all involved.

In this post, I am addressing just the most basic element of keeping a healthy commit history: how to write an individual commit message. There are other important practices like commit squashing that I am not addressing here. Perhaps I’ll do that in a subsequent post.
git  logs  writing  advice 
october 2017 by brandon.w.barry
There are well-established conventions as to what makes an idiomatic Git commit message.
sw  dev  git  tips 
september 2017 by Volgar
If you browse the log of any random Git repository, you will probably find its commit messages are more or less a mess.
git  best-practices  development 
august 2017 by scottkillen
If you browse the log of any random Git repository, you will probably find its commit messages are more or less a mess. For example, take a look at from my early days committing to Spring: Which would you rather read?
git  dev 
august 2017 by mayrav
Commit messages that can complete the sentence "If applied, this commit will.." is encouraged
git  coding 
june 2017 by scottnelle
A properly formed Git commit subject line should always be able to complete the following sentence:

If applied, this commit will your subject line here
june 2017 by tullyhansen
What it says. Summarises and argues for these 7 principles for good commit messages:
- 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
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how

Includes several references to other similar articles.
revision_control  git 
june 2017 by stu-rem
If you browse the log of any random Git repository, you will probably find its commit messages are more or less a mess. For example, take a look at from my early days committing to Spring: Which would you rather read? via Pocket
june 2017 by billchristian
The seven rules of a great Git commit message

Keep in mind: This has all been said before.

1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how

https://web.archive.org/web/20170606073413/https://chris.beams.io/posts/git-commit/
https://archive.is/Fn3MI

References
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
https://www.git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines
https://github.com/torvalds/subsurface-for-dirk/blob/master/README#L92-L120
http://who-t.blogspot.co.at/2009/12/on-commit-messages.html
https://github.com/erlang/otp/wiki/writing-good-commit-messages
https://github.com/spring-projects/spring-framework/blob/30bce7/CONTRIBUTING.md#format-commit-messages
git  commit  language 
june 2017 by coffeebucket