Live data from Hacker News

My Favourite Git Commit

fatbusinessman.com

1–10 of 389 posts

Re: My Favourite Git Commit

#5

Should this go into a commit message, instead of an issue/ticket?

I say yes. I like to keep information about the code as close to the code as possible. Issue trackers come and go, and even if you keep the same issue tracker around, how are you going to relate the change in the code to the particular issue down the road?

FWIW, I also prefer READMEs to Wikis.

Re: My Favourite Git Commit

#6

Should this go into a commit message, instead of an issue/ticket?

Since this is describing the commit and what was done and why, the commit seems like a better place.

In tools like GitHub, if you make a PR with this commit, it will also automatically put the text in the PR description.

I would much prefer this at work over what I usually see with inconsistent commit message styles and not explaining properly what was done, and not following the recommended max length per line.

Re: My Favourite Git Commit

#7

Should this go into a commit message, instead of an issue/ticket?

The commit message still logs in the usual way, but it carries the whole set of information with it, in a way that a centralised ticket system doesn't.

When a developer is looking at logs for solving some problem, they can easily review the rationale for changes.

I'd much prefer the log explaining everything, rather than having to look to a ticket that may no longer exist.

Re: My Favourite Git Commit

#8
Yeah but because git is a command line tool, it doesn’t really encourage you to do this in the first place...

The title of the commit was enough for me. I wouldn’t have read the content anyways

Post reply on HN