How to Write a Git Commit Message
If you’re here it means that you’re already able to write proper commit messages. So it’s time to take a closer look at git blame command and set things in order a little bit.
If you browse your git repository’s logs, you’ll probably find its commit messages messed up. Here’s an example from my early days in committing:
Compare that with more fix commits from the same repository:
Which one is better?
To sum things up, here are 4 rules of good git commit message:
- Isolate subject from body with a line
- Limit the subject line to 50 words
- Capitalize the subject
- Do not end the subject line with a period
Stick to the rules and will be fine.