Git: Commit Messages

jinhiro

Kenny Jinhiro

Posted on August 28, 2024

Git: Commit Messages

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.

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
jinhiro
Kenny Jinhiro

Posted on August 28, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About