Hacker News new | ask | show | jobs
by u801e 3733 days ago
> I've yet to find a situation in which I cared even a little bit about the prettiness of a git history. I am having trouble thinking of more than a couple situations, ever, where I cared about the contents of a git history, at all!

For me, it's the ability to use git blame and determine which commit was responsible for a line of code and read the commit message about why it was added.

If you don't keep a clean commit history, you end up with a commit message like "fixing some issues based on comments" which affects at least 30% of the lines of code in the file. If I'm looking at that file 6 months after the fact, that commit message gives me no information about why those lines were added/changed.

With a clean history, you can use the same command and see the exact reason why a line of code was added through the commit message that added/changed it.

1 comments

Blame is occasionally useful, but for me more than half the time the file gets moved somewhere else or the indentation changes as part of some other change so you lose all context about the original commit.

The code is the thing for me. And the less of it, the better.