How to write a commit message

During my summer internship, my boss shared with us this blog post called How to Write a Git Commit Messsage by Chris Beams. After reading through it, I knew there were others in this community who would greatly benefit from this information beyond myself. Enjoy!

-m “I goofed again, fixed it now though, I think” is a perfectly fine commit

3 Likes

I like the xkcd philosophy:

11 Likes

Included of course is the half-hearted attempt to separate features onto branches before giving up and committing everything straight to master again.

1 Like

git commit -m "derp"

But yes. Meaningful comments are much better.

The commit pre-hook and post-hook can be used to help add additional data automatically, enforce formatting, and lots of other fun things.

1 Like

Now I need to dig up some of my old ones and some out-of-context work ones.

As someone who is decently new to programming, this is very helpful, especially since one of my commits for a project I’m working on literally says
Can't figure this out. I'll get it eventually I guess (maybe)

Thanks!

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.