News for hackers. Stuff that matters.
Re:Stacked Git – manage commits as a stack of patches by jpgrayson on Thursday May 27, 2021 @02:00PM (#27306084)
Probably the main value-add of StGit versus the git-only workflow described is that StGit makes operations on its stack of patches fast and fluid.

Reordering patches with StGit is trivial with `stg push` and `stg pop`. Arbitrary patches can be combined with `stg squash`. A modification in the work tree can be incorporated into the top-most patch with `stg refresh` or an arbitrary patch in the stack with `stg refresh --patch <patchname>`.

In other words, StGit provides a command vocabulary for performing these kind of patch-stack manipulations in a first-class manner.

But as you note, everything StGit does can be accomplished with plain git--albeit with more or less difficulty depending on the particular stack manipulation goal.

Re:Stacked Git – manage commits as a stack of patches by philsnow on Thursday May 27, 2021 @03:18PM (#27306974)
> command vocubulary

A sibling comment mentions interactive rebase. I had never thought about it this way but if stacked got gives you a command vocabulary / imperative interface to adjusting your local commits, I would say `git rebase -i` gives you a declarative interface.

I prefer the latter; it's easier for me to prepare a bunch of modifications in an emacs buffer / vim tab and then have git go and do them all at once rather than try to maintain the state of the commits in my head and plan out the commands one at a time to achieve the same result.

Re:Stacked Git – manage commits as a stack of patches by IshKebab on Thursday May 27, 2021 @02:54PM (#27306704)
So it's basically a slightly nicer interface to interactive rebase? Would be nice if the Readme explained that!
Re:Stacked Git – manage commits as a stack of patches by jpgrayson on Thursday May 27, 2021 @03:15PM (#27306937)
Good point that StGit's docs could benefit from a compare/contrast with interactive rebase workflows. Thanks!

> slightly nicer interface to interactive rebase

More accurate to say StGit is an alternative interface that does some of the same things as interactive rebase (and more). For me, part of StGit's value proposition is that it is not interactive. A single imperative StGit command may accomplish as much as an interactive rebase session.

Workflows using `git rebase --autosquash` feel more similar to StGit because of their non-interactivity.

Re:Stacked Git – manage commits as a stack of patches by acidbaseextract on Friday May 28, 2021 @02:45AM (#27312433)
Describing a patch queue development workflow as a "slightly nicer interface to interactive rebase" does it a tremendous disservice. It's like saying "a database is a slightly nicer interface to a filesystem" — technically true, but a disservice.