DEV Community

Discussion on: How to Write Useful Commit Messages (My Commit Message Template)

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

Absolutely. I'd say 50% of my commit messages are subject line only, you don't always need a commit message with this much context.

I also think tagging a related issue is critical, but of course, that is assuming your issues are kept up to date! 😉

I don't tend to squash commits when I have a choice. I tend to err on the side of too many commits. Atomic commits have always served me well and I would be afraid to lose some of the benefits by squashing too frequently. 🤷‍♀️

Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦

I used to work for a startup where one of the co-founders insisted you always have a hyphen between the commit message and the id eg.

#243 - This is my commit message

Pull requests would be halted for this superficial format. A simple hook could have enforced that formating to satisfy the co-founder but they also refused to accept an automated solution.

Insanity!

Thread Thread
 
jacobherrington profile image
Jacob Herrington (he/him)

There is enforcing reasonable processes and rituals, and then there is being picky. ;)