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…


This content originally appeared on DEV Community and was authored by Kenny Jinhiro

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.


This content originally appeared on DEV Community and was authored by Kenny Jinhiro


Print Share Comment Cite Upload Translate Updates
APA

Kenny Jinhiro | Sciencx (2024-08-28T14:47:35+00:00) Git: Commit Messages. Retrieved from https://www.scien.cx/2024/08/28/git-commit-messages-2/

MLA
" » Git: Commit Messages." Kenny Jinhiro | Sciencx - Wednesday August 28, 2024, https://www.scien.cx/2024/08/28/git-commit-messages-2/
HARVARD
Kenny Jinhiro | Sciencx Wednesday August 28, 2024 » Git: Commit Messages., viewed ,<https://www.scien.cx/2024/08/28/git-commit-messages-2/>
VANCOUVER
Kenny Jinhiro | Sciencx - » Git: Commit Messages. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/28/git-commit-messages-2/
CHICAGO
" » Git: Commit Messages." Kenny Jinhiro | Sciencx - Accessed . https://www.scien.cx/2024/08/28/git-commit-messages-2/
IEEE
" » Git: Commit Messages." Kenny Jinhiro | Sciencx [Online]. Available: https://www.scien.cx/2024/08/28/git-commit-messages-2/. [Accessed: ]
rf:citation
» Git: Commit Messages | Kenny Jinhiro | Sciencx | https://www.scien.cx/2024/08/28/git-commit-messages-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.