Git Commit Messages

Help Your Future Self

Photo by Daniel Schludi on Unsplash

Recently, I was looking at my commit messages. I wasn’t able to comprehend some of them. I thought to myself, “there must be a better way.”

Lucky, there is a research paper that addresses this question. “What Makes a Good Commit Message?”

It is the consolidation of:

  • 46 research papers
  • 50 secondary sources
  • 30 expert opinions

A good message must answer these two questions:

  1. Why was the change required?
  2. What was changed?

Moreover, the researchers followed an empirical approach. They constructed a data set from popular open-source repositories and created a machine-learning algorithm to classify good messages based on these two criteria.

Check the results from the link below:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store