Live data from Hacker News

Git commands I run before reading any code

piechowski.io

301–310 of 546 posts

Re: Git commands I run before reading any code

#301
post #90

I love how the author thinks developers write commit messages. All joking aside, it really is a chronic problem in the corporate world. Most codebases I encounter just have "changed stuff" or "hope this works now". It's a small minority of developers (myself included) who consider the git commit log to be important enough to spend time writing something meaningful. AI generated commit messages helps this a lot, if de…

It's because the vast majority of commit messages are never read by anyone, and there's other ways to fund out what happened in the handful of cases where you would need to.

I read commit messages all the time to figure out what a change was about.

For small personal projects I often write one phrase messages with `-m`, but if you're working with other people you should be writing good commit messages.

Re: Git commands I run before reading any code

#302
post #297

Earlier quoted context omitted.

Which circles back to why it's important for leadership to tackle this

Yes, but not in the form of commit messages, the parent comment described things better suited to jira tickets, documentation etc. It feels like we're trying really hard to stretch the utility of commit messages here...

Mainly I was pushing back on: the code is the "truth"

I don't feel that is an accurate statement for any complex system.

Re: Git commands I run before reading any code

#305

> If the team squashes every PR into a single commit, this output reflects who merged, not who wrote. Squash-merge workflows are stupid (you lose information without gaining anything in return as it was easily filterable at retrieval anyway) and only useful as a workaround for people not knowing how to use git, but git stores the author and committer names separately, so it doesn't matter who merged, but rather wheth…

Calling squash stupid sounds like a case of Dunning-Kruger.

If you've worked on a large team without squashing and without increasing frustration I'd be greatly interested to hear about it.

Re: Git commands I run before reading any code

#307

Earlier quoted context omitted.

I don’t understand how people can remember all these custom scripting languages. I can’t even remember most git flags, I’m ecstatic when I remember how to iterate over arrays in “jq”, I can’t fathom how people remember these types of syntaxes.

I am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workflow deviates from their daily usage. At this point perhaps a million person-years have been sacrificed to the semantically incoherent shit UX of git. I have loathed git from the beginning but there's effectively no other choice. That said, the OP's commands are…

I just use my ide integrations for git. I absolutely love the way pycharm/jetbrains does it, and I'm starting to be ok with how vscode does. Remembering git commands besides the basics is just pointless. If I need to do something that the gui doesn't handle, I'll look it up and put it in a script.

Re: Git commands I run before reading any code

#308

Earlier quoted context omitted.

Yes, but not in the form of commit messages, the parent comment described things better suited to jira tickets, documentation etc. It feels like we're trying really hard to stretch the utility of commit messages here...

Mainly I was pushing back on: the code is the "truth" I don't feel that is an accurate statement for any complex system.

I don't like complex systems, and I work hard not to create them.

Re: Git commands I run before reading any code

#309

Earlier quoted context omitted.

Mainly I was pushing back on: the code is the "truth" I don't feel that is an accurate statement for any complex system.

I don't like complex systems, and I work hard not to create them.

Sure but code can't capture everything. Maybe with enough comments I guess, but not code alone. For example, code won't tell you that this feature was timeboxed hence this edgecase was not supported

Re: Git commands I run before reading any code

#310
post #90

I love how the author thinks developers write commit messages. All joking aside, it really is a chronic problem in the corporate world. Most codebases I encounter just have "changed stuff" or "hope this works now". It's a small minority of developers (myself included) who consider the git commit log to be important enough to spend time writing something meaningful. AI generated commit messages helps this a lot, if de…

And in a squash and merge workflow, which are most teams I've been on the past 8 years, it really is the title of the pull request or merge request. That is what really matters.

And I really like that because it leaves room to let the developer do whatever kind of commit messages they want to that makes sense to them. Because nobody's really ever going to read those again after it squashed and merged.

Post reply on HN