How to Write a Git Commit Message


71 bookmarks. First posted by loki 5 weeks ago.


How to Write a Git Commit Message
16 hours ago by jpalat
2. Limit the subject line to 50 characters
git  tips 
12 days ago by amadamala
RT : How to Write a Git Commit Message (2014): ( )
from twitter
12 days ago by mjr5749
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
12 days ago by jrubenoff
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 
12 days ago by trisignia
tl;dr:

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
git  scm  bestpractices  newbie  tips 
22 days ago by dserodio
A very useful guide on how to craft proper git commit messages.
git  commit  messages  message  howto  text  short  rules  guide 
23 days ago by logicannullata
31 Aug 2014 | revision history

Introduction | The Seven Rules | Tips

Introduction: Why good commit messages matter
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 these gems from my early days committing to Spring:

$ git log --oneline -5 --author cbeams --before "Fri Mar 26 2009"

e5f4b49 Re-adding ConfigurationPostProcessorTests after its brief removal in r814. @Ignore-ing the testCglibClassesAreLoadedJustInTimeForEnhancement() method as it turns out this was one of the culprits in the recent build breakage. The classloader hacking causes subtle downstream effects, breaking unrelated tests. The test method is still useful, but should only be run on a manual basis to ensure CGLIB is not prematurely classloaded, and should not be run as part of the automated build.
2db0f12 fixed two build-breaking issues: + reverted ClassMetadataReadingVisitor to revision 794 + eliminated ConfigurationPostProcessorTests until further investigation determines why it causes downstream tests to fail (such as the seemingly unrelated ClassPathXmlApplicationContextTests)
147709f Tweaks to package-info.java files
22b25e0 Consolidated Util and MutableAnnotationUtils classes into existing AsmUtils
7f96f57 polishing
Yikes. Compare that with these more recent commits from the same repository:

$ git log --oneline -5 --author pwebb --before "Sat Aug 30 2014"

5ba3db6 Fix failing CompositePropertySourceTests
84564a0 Rework @PropertySource early parsing logic
e142fd1 Add tests for ImportSelector meta-data
887815f Update docbook dependency and generate epub
ac8326d Polish mockito usage
Which would you rather read?

The former varies wildly in length and form; the latter is concise and consistent. The former is what happens by default; the latter never happens by accident.


...
git  howto  tips 
26 days ago by ndf
Great article with git commit message tips:

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

Most of this summarizes to: use the imperative in the subject line, use vim to make sure of formatting, and use the body to explain WHY!!!! So much explain Why.
git 
4 weeks ago by thcipriani
"Fortunately, there are well-established conventions as to what makes an idiomatic Git commit message. Indeed, many of them are assumed in the way certain Git commands function. There’s nothing you need to re-invent. Just follow the seven rules below and you’re on your way to committing like a pro."
(also see this for a list of leading active verbs to start with: https://github.com/joelparkerhenderson/git_commit_message )
git  tips  documentation 
5 weeks ago by mechazoidal