Skip to main content

Command Palette

Search for a command to run...

Writing good commit messages

Updated
•2 min read•View as Markdown

What is a commit message?

Before saving changes to a local repository in Git, we have to tell Git what types of changes we have done for future reference. This is done by adding a commit message to identify the changes.

Why should everyone write good commit messages?

If you are working on a personal project then it is not necessary but advisable to write good commit messages. If you are working with a team then it is necessary to write good commit messages. Good commit messages will not only help you but every team member in building the product or updating it. Here are some of the reasons to write good commit messages:

1) Tracking an implementation is easier- An overview on any type of implementation done can be easily understood through commit messages.

2) Save Time- If you review the code in future and you want to understand why you made some changes in the past in your own code, commit messages helps you to find out quickly .

3)Communicate- Commit messages helps us to communicate with other team member and explains them the features changed, good commit messages makes it easy for team members to understand the updated code.

Example of good commit message

feat(lang): add french language

Here one can easily understand that a new feature is added related to language

test: add negative test for entering mobile number

Here one can easily understand that more test cases are covered regarding negative mobile number