

Note: This article assumes that you are aware about basics of Git, how branches work, how to add uncommitted changes of a branch to stage and how to commit the changes.

Ensuring that commit messages are maintained in such cases could be tricky, especially when development spans across days, weeks, or even months. While working on a large project, we often deal with a lot of moving parts that are updated, added or removed. When Git commits are isolated based on context, a bug which was introduced by a certain commit becomes quicker to find, and the easier it is to revert the commit which caused the bug in the first place.

Any code that you commit today, a year from now when you look at the same change you would be thankful for a clear, meaningful commit message that you wrote, and it will also make the lives of your fellow developers easier. What does Git commit do? Git commit messages are the fingerprints that you leave on the code you touch.

Why a meaningful Git commit history is important So it's important that these messages reflect the underlying change in a short, precise manner. As the project/repository evolves over time (new features getting added, bugs being fixed, architecture being refactored), commit messages are the place where one can see what was changed and how. Git commits are one of the key parts of a Git repository, and more so, the commit message is a life log for the repository.
