bene : studio is a global consultancy, helping startups, enterprises and HealthTech companies to have better product

How we use Git commit messages

git-commit-messages

At bene : studio we love knowledge sharing to help the community of professionals. This is why we are launching an open source knowledge base on our blog, which we are going to update regularly.

These solutions come from our internal workshops with our team of developers and engineers.

Our workshops are restarting!

Join the FREE ONLINE React Native workshop on August 11, and learn how to connect native modules to build an awesome Music Creator.

Join the workshop and invite your peers as well! For full details and registration visit the event page:

GUIDELINE FOR BENE : STUDIO GIT COMMIT MESSAGES

Commit messages are an important means of communication between developer team members. It is true for greenfield projects too, but essential for modifying and maintaining older projects. Here at bene : studio we discussed in detail what kind of commit message style fits our development process best.

We shared our experiences with current commit messages within the team and read various articles about good commit messages (see the references below).

THE TEMPLATE

At our internal workshop we came up with the following commit template:

PROJ-001: feat: Initial commit

Where:

  • PROJ-001 is the corresponding JIRA ticket number
  • “feat” is one of the following: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
  • Initial commit is the subject of commit.

Since we are using Atlassian products for project management (JIRA) and Git repository (Bitbucket), the ticket number becomes a link where we can easily check the details of the corresponding task. This template also ensures that we never work on a task without a corresponding JIRA ticket – an essential rule of a responsible, managed working style.

To ensure that all commits are following this template, we are using a great open source tool called commitlint (https://commitlint.js.org/#/) and customized it to our needs.

We felt that our commitlint setup is quite straightforward and can be used by the open source community. Therefore we published it as an NPM package:

http://l.benestudio.co/npmjs-commitlint-config-benestudio

Feel free to use it or modify it according to your needs. Any feedback is welcome.

Visit our page on Github as well to find more materials on various topics.

This article was written by bene : studio team a global digital product consultancy. From planning to delivery the studio helps startups, enterprises and HealthTech companies to have better products.

Visit our join us page if you fancy working at the studio!

REFERENCES

FUN STUFF

git-commit-messages