Quick Tip: Using the tool Better Commits for generating commits.

Better Commits

My colleague, Jeroen Smink, has recently taken up blogging. You can explore his insightful posts here. In addition to his engaging blog content, Jeroen has compiled a useful 'Toolbox' section, where he shares a variety of helpful resources. One standout resource he mentioned was 'Better Commits,' a tool that was new to me but proved to be extremely valuable. For those interested in enhancing their commit messages, I highly recommend checking out 'Better Commits' at this link.

What is Better Commits?

In the world of software development, clear and concise commit messages are not just a courtesy—they are a necessity for maintaining project history and facilitating effective team collaboration.

Better Commits is a Command Line Interface (CLI) tool designed to revolutionize the way developers create commit messages, adhering to the conventional commit specification. This tool ensures that each commit you make is not only informative but also formatted to a standard you can use in your team.

"Better Commits" is designed to guide you through a series of interactive prompts, meticulously crafting a commit message that speaks volumes about the changes you've made. 

The features

  • Automated generation of conventional commits via interactive prompts.
  • Customizable settings with effective defaults.
  • Automatic inference of ticket numbers and commit types from branch names for rapid and uniform commits.
  • Seamless branch creation is supported by "better-branch" for consistency and flexible workflow integration.
  • Interactive git status and addition of files during commit preparation.
  • Color-coded commit message previews.
  • Emoji support for each commit type.
  • Global or repository-specific configuration.
  • Comprehensive configuration validation and error reporting.

As a side-effect of formatting messages

  • Automatically fills in pull request titles and descriptions.
  • Facilitates the automation of semantic versioning releases.
  • Streamlines changelog creation.
  • Auto-links and closes related tickets or issues upon merge.

Why use it?

As developers, we all understand the critical importance of clear, concise commit messages in maintaining project history and facilitating effective collaboration. That's where "Better Commits" comes into play—a tool I've found indispensable for elevating our commit message game.

This CLI tool not only streamlines the process of generating conventional commit messages through interactive prompts but also offers a level of customization and intelligence that integrates seamlessly into our workflows.

And Configuration?

The configuration can be changed for your style. I'm working a lot with Umbraco Websites and Core libraries and changing the configuration in such a way that it's specific to my team's needs in our projects.

You can find the configuration information here: 


https://github.com/Everduin94/better-commits?tab=readme-ov-file#%EF%B8%8F-configuration


And what about Branch Names?

With better commits comes a second feature called better-branch. This will generate a branch name also using questions.