Stacking Workflow
I recently learned about the Stacking Workflow in Git through stacking.dev. Benefits I experienced:
- More fun during development
- Reviewing PRs is more fun and the code review quality increases, because the diffs are smaller
- I experienced that stacked PRs actually make me structure my code better, because I have to think more about which changes belong together
- With the right tooling, it is really easy to create a lot of PRs easily
Downsides: - A lot of CI runtime. This is not a problem if you self-host your runners
- The tooling is either expensive or not really great yet. Hopefully this will change as this type of workflow becomes more popular
Comparison of different Tools
You basically can't do a stacking workflow without proper tooling, otherwise it becomes really cumbersome and doesn't make sense anymore. You need a tool which automatically creates PRs from your commits.
Tool | Pros | Cons |
---|---|---|
Graphite | - Really good workflow - PR Review UI which was made specifically for Stacking - Great CLI - Basically what you want to use in a professional setting if you are on GitHub and can afford it |
- Expensive (for closed-source) - Only works with GitHub |
spr | - Free & Open Source - Easy to use, easy to setup |
- Doesn't cover all edge-cases of git you can run into - Sometimes you break your stack and you have to fix stuff manually. As the project becomes more mature, this might not be a problem anymore - Only for GitHub |
I will extend this table as soon as I test out additional tools. Some tools I didn't test yet:
- https://github.com/ezyang/ghstack (I tested it a bit, but ran into problems. Didn't feel that stable yet)
- https://sapling-scm.com/
- https://www.git-town.com/