DEV Community

loading...

Discussion on: A guide on commit messages

Collapse
ginomempin profile image
Gino Mempin • Edited

In our project, we combine the conventions for branch naming and commit messages. Then we partially automate the commit message format with git hooks.

For example, our branches are commonly organized by ticket number and type. So, something like bug/#123/moduleA/crash-on-close. You can then setup a git commit hook that provides a template like this:

#123: bugfix: [Fixed ...]

[Details]

where #123 and bugfix are parsed from the branch name. You can also use git commit templates, but they are not as dynamic as git hooks.