These guidelines are based off of this guide. Some of the key takeaways, plus some other opinionated guidelines:
- Clarity is key: a commit should be clear even to a viewer who doesn’t have the full context in which it was made.
- Start your commit message with a verb, and use sentence case capitalization.
- Use the imperative verb when writing a commit message (see the link above if you don’t know what that means). Example: "
Fixed" → "Fix" - Commit things that make sense to be grouped in a single commit. Ask yourself "does it make sense for someone to cherry pick this single commit? Is there something missing in it, or something extra that the person wouldn't need?" - if you do that, you'll end up aiming for 1 commit per fix or feature, which makes the codebase cleaner.
- Test what you are fixing before committing. Only commit what you’ve tested and are sure that is good to go. This avoids unnecessary comm