Skip to content

Instantly share code, notes, and snippets.

@afg419
Last active January 7, 2016 21:05
Show Gist options
  • Save afg419/b8f466900f8bbb5b9534 to your computer and use it in GitHub Desktop.
Save afg419/b8f466900f8bbb5b9534 to your computer and use it in GitHub Desktop.

(Quotes from http://chris.beams.io/posts/git-commit/ if not otherwise specified.)

Style: Messages should be consistent in their form... Similar length, similar spelling (full word or abbreviations), similar capitalization usage, similar punctuation, and similar tense of speech.

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

In terms of imperative mood: "If applied, this commit will your subject line here"

Content: Messages should be consistent in their content... Should explain what and why, not how.

Tracking: The body of a commit message can contain tracking id's to reference particular issues or tasks.

Size of the commit message should be commensurate to the severity of the change.

Examples: " Fix curl command to support GitHub's new redirect
Closes #120." -tpope

Examples: "Remove set showcmd
Closes #49." -andschwa

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