News for hackers. Stuff that matters.
Re:Fortunately, I don't squash my commits by dcolkitt on Monday October 05, 2020 @10:32AM (#24688092)
I wish git had a builtin notion of two different types of commits: working commits and release commits.

I really like making tiny, continuous commits as I work. It's a great flow. git-revert becomes a Ctrl-Z on steroids. I don't what to clutter up the "official" history, with all these tiny changes, many of which don't even compile. That breaks git-bissect and all kinds of other flows.

So the only option is to squash commits. But there's something deeply uncomfortable and unsettling about permanently re-writing history. Plus, it's nice to have a history of those working commits as an artifact. If I'm trying to unpack the reason that I did something 9 months ago, then seeing a replay of the code changes is super-useful.

Re:Fortunately, I don't squash my commits by madhadron on Monday October 05, 2020 @10:53AM (#24688275)
I go one step further and work entirely in get rebase -i where I build up a stack of tiny, incremental commits. This also lets me get small changes reviewed and committed on a nearly daily basis instead of building up days or weeks of work.

I've been wishing for a git GUI that lets me drag hunks around such a stack so I don't have to keep moving them by hand.

Re:Fortunately, I don't squash my commits by WorldMaker on Monday October 05, 2020 @12:29PM (#24689233)
You can use merge commits to create your release groups. Use tools like --first-parent to limit the depth you see of the graph by default; that clutter can still be there, but you can take advantage of the nature of the graph itself to "declutter" simply by setting the "depth" you are working in.
Re:Fortunately, I don't squash my commits by IggleSniggle on Monday October 05, 2020 @10:49AM (#24688239)
You could get this behavior pretty easily with a double merge: “main” which contains the squashed commits and “history” which contains all commits as well as “main” merged back in post-squash.

I do see your point though.

Edit: the only reason to merge “main” into “history” is to enforce convergence.

Re:Fortunately, I don't squash my commits by amenghra on Monday October 05, 2020 @10:56AM (#24688304)
Re:Fortunately, I don't squash my commits by mpweiher on Monday October 05, 2020 @10:58AM (#24688326)
> two different types of commits: working commits and release commits

??

   git tag
??