Atomic commits

<aside> 💡 Atomic commits make it easy to roll back without affecting other changes and to make other changes on the fly. It also becomes a lot easier to merge the code into master and deal with potential conflicts.

</aside>

Keep commits small and atomic:

Writing a useful commit message

Consider the guidelines in How to Write a Git Commit Message.

They list "the seven rules of a great Git commit message":

  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

The most useful recommendations are:

Use the imperative mood in the subject line