Git Commit Messages

Git Commit Messages

While you can write you Git commit messages in any way you would like, there are some standards that can help you organize your repository. To follow these standards, your commit messages should have the following qualities:

  • Imperative: Use the imperative mood (the imperative mood means “spoken or written as if giving a command or instruction”). For example, instead of “Added server,” write “Add server”
  • Descriptive: “added stuff,” “modified code,” and “fixed bug” are not going to help you later
  • Capitalized: Begin with a capital letter
  • Lacking punctuation: No punctuation needed, commas excepted (i.e. do not end with a period)
  • Short: Fewer than 50 characters is typically plenty
    • If more description is needed, begin the commit message with a single short line summarizing the change followed by a blank line and then a more thorough description