6/11/2026 at 7:56:09 PM
All the things in between my commits is a messy soup. Looking there is not useful to anyone. I rewrite my history with git rebase so each commit is small and atomic. The story I create with my commits is what explains why things are as they are, it doesn't matter if it's the true chronological story on how it actually happened.I agree with the author that reviewing pull requests is too late. The problem with pull request is that they make it hard to review individual commits since they are geared towards reviewing the result of an entire branch at once. But the answer is not to share all the noise, it should be to encourage small atomic commits so you can review the early work before the entire feature/fix is complete.
by Lindby
6/12/2026 at 1:05:07 AM
> The problem with pull request is that they make it hard to review individual commits since they are geared towards reviewing the result of an entire branch at once. But the answer is not to share all the noise, it should be to encourage small atomic commits so you can review the early work before the entire feature/fix is complete.Isn't that just a GitHub problem, as opposed to Phabricator, Gerrit, etc.?
by isityettime
6/12/2026 at 1:21:10 AM
It is, but I think it's hard to explain to folks who have only used the Git/GitHub model – I know, I've been that person not really getting it.I think what's missed is two things:
- In the Phabricator/Gerrit model you typically end up with changes that are smaller than a PR, but bigger than a commit.
- You lose some history, or track it in a different way. With a PR you might add code to address comments in a new commit on the end, but with Phabricator/Gerrit you don't. If you already aggressively rebase in Git to absorb changes into commits that they make sense to go in, this won't be much of a change, and some systems give you views on the history happening within each change. But if you expect to see everything like that in the Git history, you may not get that, but the workflow changes around it and that's ok.
I think both types of review are in a local maxima, where you lose some things to move to the other type, and it was fear of losing those from my workflow that made me resist the change a bit. When you get there though, you realise it's just not a problem.
by danpalmer
6/12/2026 at 12:19:56 PM
What I've observed both in the comments here, and in my professional network is that people tend to fall into two distinct camps:1) Those that use git like a crude autosave who then squash on merge
2) Those that prefer neatly wrapped, fully functional atomic commits
It seems those ideas are in direct opposition to one another with 1) being more common in my experience, perhaps as github naturally supports it better plus the fact that stacked commits can solve some of the problems 2) accounts for... but if I had a choice, 1) definitely makes more sense to me.
by marliechiller
6/12/2026 at 1:51:18 AM
The way you use commits sounds like how I tend to use stacked PRs at work. Good commit hygiene is hard to enforce at a team level, but for whatever reason at the PR level people are happy to write good descriptions and keep the sets of changes tidy.by seabass
6/12/2026 at 5:18:27 AM
This is purely a function of what people expect to be looked at.... if your team started looking at each individual commit step by step, then you'd probably find that people started paying more attention to how their commit hygiene looks.by nightpool
6/12/2026 at 7:16:34 AM
This is the response I expected to see here.Reading through the article, I'm reminded of my dismay reading this exact sentiment every time version control is discussed. So many people are so quick to throw away their history so that things look "tidy". It makes no sense, but somehow it fits a certain programmer-brain logic that is surprisingly common.
My style is to commit often. Like dozens of times per day. Commits are the record of what happened, and I want as much of that record to exist as possible. I've been saved so many times by a git bisect that landed pointing at a tiny commit to a single line that looks completely innocuous, yet broke something in a subtle way that only got discovered way later.
That's what source control is for, in my opinion. Finding stuff like that. So many of these things would have been really painful to find if I'd had to sift through every line of a big commit.
So to watch people intentionally balling up an entire PR's worth of commits and squashing them together to throw away the only (in my mind) thing that version control is good for, is truly baffling.
But yeah, there are plenty of people like the parent in that camp, so the author's plan to add even more granularity will be an uphill battle.
by jasonkester
6/12/2026 at 10:44:31 AM
But do these intermediary commits run? I wouldn't mind making smaller commits, but usually wait until the changes result in a bunch of code that compiles and does what it should. It sounds as if you do checkpoints that don't necessarily result in working code or pass tests. Not that that is wrong, but it is a very different philosophy. I usually expect what I check out to compile and sort of work. I can't really pick up somebody else's train of thought midway.by wvh
6/12/2026 at 8:07:46 PM
> So many of these things would have been really painful to find if I'd had to sift through every line of a big commit.> So to watch people intentionally balling up an entire PR's worth of commits and squashing them together to throw away the only (in my mind) thing that version control is good for, is truly baffling.
> But yeah, there are plenty of people like the parent in that camp
I'm confused. The parent doesn't want big commits but rather, as they wrote twice, commits that are small, atomic and without noise. So presumably "fix typo" would be removed during rebase but "rename function" would stay and be separate from "implement logic".
by danadam
6/13/2026 at 6:38:08 AM
I guess the difference between the parent and me is that I’ve been around long enough to see my share of “fix typo “ and “remove logging “ commits that accidentally removed the line above or below.That’s the commit I want to find six months later when the SVG text is blurry because we’re no longer forcing opacity to 1.0 at the end of a transition.
by jasonkester
6/12/2026 at 10:33:38 AM
> So many people are so quick to throw away their history so that things look "tidy". It makes no sense, but somehow it fits a certain programmer-brain logic that is surprisingly common.I want my commits to reflect the evolution of the theory of the program, not a chronological log of my reflection and attempts. In my local branches I snapshot things that only matters to my working process. And before sharing, I make sure that the commits are atomic with a proper description.
When sending a report, do you also send all the post-it, the notebook with your notes, the books with the highlights , your conversation with your colleagues, your web history? I don’t think you do. My local history have commits that reflect my working process which can be messy. Before sharing I tidy them, so that the changes are easily understood.
> entire PR's worth of commits and squashing them together to throw away the only (in my mind) thing that version control is good for, is truly baffling
A PR is supposed to be atomic if you’re using squash and merge. Bundling different changes is the antipattern here, not the squash and merge.
by skydhash
6/12/2026 at 10:27:00 AM
Github default squash commit template & merge strategy makes it easy to go from the squash commit to the feature branch. So you get best of both worlds -- clean master and granular history on the branch. Bisect on master tells you which branch broke it, and then bisect on the branch if you want to find the original commit. Same with blame.IMO squash 4 the win. Github squash defaults work well. Gitlab squash defaults don't.
by foobarbecue
6/13/2026 at 6:12:37 PM
Imagine a feature in git, where when you merge, you get a single new commit on the main branch like you want, where the message could describe the changes in summary, like you want. But also: the commit contains a reference to the source branch so you can easily find it back, break it down, bisect into it, all without having to leave git or rely on data stored at 3d parties. That would be pretty neat! It's like, the best of both worlds, but all inside git!Well. That's what a merge commit is.
Your approach is nearly identical to creating a merge commit, except the pointer to the second parent (the "original branch") is indirectly recorded via the PR link, instead of directly inside git.
If you create merge commits, then you have your "clean main branch" (via git log --first-parent), as well as the extended history with all the source commits (via git log). And as a bonus, merge commits are supported by every git host, and they work the same in all of them.
I think the whole "squash merge vs merge commit" discussions would be a lot less prevalent if --first-parent would be how git and git hosts displayed commit histories by default. :(
by avaq
6/12/2026 at 3:04:16 PM
That's interesting, so you keep the branches from before the squash -- but do you also rename them somehow, to show that they're now "frozen historic versions"?by KajMagnus
6/12/2026 at 3:28:39 PM
That’s what I do, and I find this talk about “throwing away” code history baffling. It’s version control. Git branching is cheap.I make a ton of backup copies. I rearrange the history to how I want before I share it (git history split is great). I keep my nonsense, others see a readable changeset. (Only downside is the occasional housecleaning of old branches, but after a while their usefulness diminishes.)
by isleyaardvark
6/12/2026 at 3:52:28 PM
Actually, what I usually do in Github is set the PR branches to delete when you squash-merge the PR, but then the PR always has an "undelete branch" button you can use forver in case you want to look at the details of the branch and don't have a local copy of the branch.by foobarbecue
6/12/2026 at 9:53:06 AM
> But yeah, there are plenty of people like the parent in that camp, so the author's plan to add even more granularity will be an uphill battle.I find it sad to see it as a battle. Can't we agree on the idea that different people may have different preferences?
"Converting everyone to Linux or vim" would be an uphill battle... if it was worth fighting at all. I don't care what OS or text editor others use, as long as I can use the one that is best for me. If I am happy with commits, I don't want to fight with people who aren't... what would be the point?
by palata
6/12/2026 at 7:30:29 AM
> I've been saved so many times by a git bisect that landed pointing at a tiny commit to a single line that looks completely innocuous, yet broke something in a subtle way that only got discovered way later.I did git bisect exactly zero times in my life.
by vbezhenar
6/12/2026 at 11:16:38 AM
Regardless if it is a messy soup or not, if disk/cost is not an issue, I would have no problem with anyone (likely agents) looking at what I was doing, and forgive me, but my reasoning™.Not overly confident in my position, but I believe agents prefer the extra information albeit noise to some.
by thomasfromcdnjs
6/12/2026 at 5:22:40 AM
Why do you want those commits though? In my experience people only look at history a) to see who wrote the code / when it was last changed, which works equally well with any approach, b) to see which feature it was part of, for which you will click through to the PR anyway, or c) to bisect for when a bug was introduced, in which case unedited/unrebased "noise" commits are more useful because you have more guarantee that each commit compiles and the original train of thought is more useful than the fictional history when you're looking for something unintentional.by lmm