Git: Commit Messages
Kenny Jinhiro

Kenny Jinhiro @jinhiro

About: These are my personal developer notes, but I made this public in hopes of helping people too.

Joined:
Apr 4, 2024

Git: Commit Messages

Publish Date: Aug 28 '24
0 2

TLDR: Start with a word that describes the whole code change. Then, make a 4-to-5 word sentence describing the whole code change.

Recommended Examples:

  • Feat: Login
  • Fix: iOS 16.0 Crash

With these examples, you generally know what goes on. Points of reasons are given below.

1. First Word Matters

A word that could describe the whole code change makes anyone generally know what goes on in your code.

These are the words that are conventionally used.

1. Feat
New feature is being launched by the code change.

2. Fix
A fix is done in the code change.

3. Test
A test is added in the code change.

4. Chore
A package is modified (added or removed) in the code.

2. Commit Message

4 or 5 words that could generalize the code changes is absolutely recommended. Less words? Better!

Developers appreciate simplicity, look at these two examples:

  1. Test: Add new unit tests for user authenticating login functionality.
  2. Test: Added login tests

Well, in the end, these guidelines aren't a must, but simpler description would make everyone happy.

Comments 2 total

  • King Triton
    King TritonAug 29, 2024

    Great insights! As someone who's had to dive into countless code repositories, I can fully appreciate the value of clear and concise commit messages. These suggestions are spot on, especially the emphasis on the first word – it really sets the tone for what to expect in the change. Simple and effective communication can save so much time and confusion. Thanks for reminding us how impactful a well-crafted commit message can be!

  • Joshua James
    Joshua JamesNov 1, 2024

    commit message: "minor changes"
    2000 lines changed

Add comment