I read a lot of posts that describe how to write awesome commit messages?. This is an undeniable fact that every developer needs to do it for some or more reasons. It’s a habit, hard to adopt but once gained, it returns a fruitful response. On professional grounds, I have sensed my top 3 reasons for this:
Your commit resolves to a particular version of the codebase. It can include a bug fix or a new feature or an enhancement. All this means that a change has been introduced. To identify this, there must be a meaningful one-liner sentence without digging into details. Viewing and reading code snippets within a bunch of files is not cool at first! Think about the scenario when you are chasing a buggy commit to extract out.
When a team collaborates on a project, they have assigned their specific branches. One’s scope of work will decide how many features are required? Lines of code and actions they need to integrate? During work if a bad commit is introduced and being pushed to the stack by upcoming ones, it becomes hard to trace the buggy part if you don’t have a relevant trail commit message. Always Remember! Healthy and appropriate commit history for each iteration provide a backtrace, resolution in relevance to bug!
PR helps to understand the state in which code has been built, changes integration and avoids code smells. PR Review is a challenging task. You have to analyze code and report smells when they exist. Having a low discouraged commit history results in poor state lookup for a module or piece of code. As PRs are a way of getting response
Hungry to learn about writing commit messages? Check this link from freeCodeCamp
Happy committing !!