Skip to content

Instantly share code, notes, and snippets.

@gavingmiller
Forked from matthewhudson/good-commit.md
Created May 14, 2012 22:02
Show Gist options
  • Save gavingmiller/2697681 to your computer and use it in GitHub Desktop.
Save gavingmiller/2697681 to your computer and use it in GitHub Desktop.
Linus Torvalds describes a good commit message. See https://github.com/torvalds/subsurface/blob/master/README#L161
A good commit message looks like this:
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
74 characters or so. That way "git log" will show things
nicely even when it's indented.
where that header line really should be meaningful, and really should be
just one line. That header line is what is shown by tools like gitk and
shortlog, and should summarize the change in one readable line of text,
independently of the longer explanation.
@gavingmiller
Copy link
Author

Removed open source specific information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment