Hacker News new | ask | show | jobs
by BeefDinnerPurge 902 days ago
It seems like git itself ought to be able to combine multiple commits into a single ubercommit for the sake of PRs, but allow pulling each of those sub-commits that constituted it in the first place afterwards for debugging and QA purposes. But I guess these 3d party tools achieve that as well.
3 comments

It does, if you interact at the CLI, where a "PR" concept does not exist.

   git diff ^initial-commit~1 final-commit
However for that to be available after a contribution has been included in the master branch, one has to use merge commits.

Otherwise there are no inherent markers as the graph has been flattened in to a linear sequence. One then has to make use of external tools, or commit comment conventions to recreate what was actually done or intended.

You can basically achieve that with a rebase then merge with --no-ff. You can then just bisect etc with "first-parent" to see the big chunks as they're landed.
YES. I've been saying that for years. The fact that it doesn't work this way is really pretty braindead.