Four rules of thumb for committing code

  • The commit message should explain Why, not what
  • Atomic commit. As small as possible
  • Don’t commit commented out code. Just remove it.
  • Before it goes into master/trunk, always have at least two sets of eyes on it. You only have one set even if you have glasses.