Live data from Hacker News

My Favourite Git Commit

fatbusinessman.com

41–50 of 389 posts

Re: My Favourite Git Commit

#41
I love these commits. Then don't have to be this verbose, but they have to tell a story of why things were done. I can sort of deduce the what from the code itself, but the why is sometimes shrouded in mystery.

I started with these explanatory git commits a few months ago and they are super useful, even if you're just reading your own commits from some time ago.

Re: My Favourite Git Commit

#42
I often review commit logs of my teams, especially while we are tracking down problems or I'm making sure the release notes capture everything.

There has to be a balance between this and "WIP"; I'm imagining trying to page through the commit log to see what changed when every 1 line change has a 35 line commit associated with it.

Re: My Favourite Git Commit

#43

OR you could just write Replace invalid ASCII char. Fixes rake error 'invalid byte sequence in US-ASCII'. I don't want your entire life story in my commit log.

“I didn't have time to write a short commit message, so I wrote a long one instead.”

Re: My Favourite Git Commit

#44

OR you could just write Replace invalid ASCII char. Fixes rake error 'invalid byte sequence in US-ASCII'. I don't want your entire life story in my commit log.

This is true when you can reference the commit to an issue. Then, seeing the simple commit message you can select if you want to dig up what happened by reading up the comments at the issue.

On the other hand it really gets into my nerves when people don't use the task/issue/whatever manager system appropriately. Recently, I lost a couple of days trying to figure out how to compile a c++ framework because the other guy didn't document his pipeline. In general I'm really disappointed by the majority of my colleagues for the lack of comments inside and outside of our codebase and this is a persistent issue, at all the companies I worked for. Me along with other similarly irritated people, always ask for documentation if it is not given.

Re: My Favourite Git Commit

#45

OR you could just write Replace invalid ASCII char. Fixes rake error 'invalid byte sequence in US-ASCII'. I don't want your entire life story in my commit log.

> I don't want your entire life story in my commit log.

I[1] want enough debug information in the commit log to be able to reproduce the issue without having to go on web hunts to understand the problem. Especially when the change appears to be trivial on the surface, because these are the ones that can turn out to be rabbit holes.

I don't want to have to interrupt you to get this information because you didn't write a good enough commit message, and you probably don't remember anyway. I don't want go look at an external issue tracker that i may not have access to, or may not even exist anymore.

[1] Where "I" is: me, your future self, a future maintainer, a junior dev, an open source contributor.

Re: My Favourite Git Commit

#46
For anybody wondering, the likely origin of the invalid character is somebody using an Apple Ireland/UK keyboard layout where # is Option-3 (AltGr-3), and non-breaking space is Option-Space (AltGr-Space).

Re: My Favourite Git Commit

#48

Earlier quoted context omitted.

Why not put it in both?

Commit messages should be short and to the point. I don't want to read a story to understand what this commit did.

1) Just read the title 2) Maybe have TL;DR section for a summary, and details for who cares.

Having a rich commit message is extremely important for capturing code review discussions and design decisions and glue things together for the set of changes in a single place. The advantages far outweigh any negatives from a short commit message that will not give you the "why" of the solution.

Re: My Favourite Git Commit

#49
I love descriptive git commit messages. For those complaining about the length: 1) Just read the title 2) Maybe have TL;DR section for a summary, and details for who cares. 3) Use pretty printing for git log

Having a rich commit message is extremely important for capturing code review discussions and design decisions and glue things together for the set of changes in a single place. The advantages far outweigh any negatives from a short commit message that will not give you the "why" of the solution.

Re: My Favourite Git Commit

#50

OR you could just write Replace invalid ASCII char. Fixes rake error 'invalid byte sequence in US-ASCII'. I don't want your entire life story in my commit log.

Generally speaking sure, there's no need to make things more complicated than they are, but the author even found some evidence in the history that indicates other people found this message useful.

The powerful thing about this is having everyone put this kind of info in the same place IF they think it might be useful to the next person.

Post reply on HN