Git Best Practices

Naming Conventions


Repository Names

  • Use only lower case alphanumeric characters.
  • Use '-' rather than spaces or underscores.

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

Branching


Branch Naming

  • Use only lower case alphanumeric characters.
  • Use '-' rather than spaces or underscores.
  • Names should be of the form: <branch-type>/<firstname><lastname>/<branchname>
    • dev/samkristoff/cursors
    • dev/sudharsansukumar/user-authentication
    • patch/samlogan/ok-button

Branch Names

  • dev
  • patch
  • master
  • release

Resources