Wednesday, January 12, 2022

Git Commit Messages

I've been using GitHub to host my codes for a long time already. However, I often get lazy and  just put "edits" in my commit messages. This is obviously a bad practice!

I decided to look around to learn more about how to write good commit messages. I came across these resources [1] [2] [3]. 

The following format looks good:

Commit Type(Scope): Subject Line


Commit Types

  1. Feature
  2. Fix
  3. Style
  4. Refactor
  5. Test
  6. Docs
  7. Chores

Subject Line

Short text (less than 50 characters) that summarizes the commit. 


This is an optional detailed description of the commit. Wrap at 72 characters.