r/git • • Oct 21 '26

grove: git worktree workspaces across multiple repos

I made a small tool for a problem I kept having: one feature, several repos, and the same branch needs a worktree in each one.

gw create -b feat/login -r svc-a,svc-b

makes a directory with both repos checked out on feat/login as worktrees. gw status, gw sync and gw delete operate on all of them. A per-repo .grove.toml sets the base branch (we branch from stage, not main) and a setup command to run after checkout, e.g. pnpm install.

It shells out to git for everything and does nothing a shell script couldn't; it just does the bookkeeping of which worktrees belong together. Lately I mostly use it to give each coding agent its own isolated checkout across the repos it needs.

Single static Go binary, MIT.

https://github.com/nicksenap/grove

Curious whether people here handle multi-repo branches differently.

0 Upvotes

10 comments sorted by

6

u/watabby Oct 21 '26

useless tool

4

u/sati Oct 21 '26

Indeed, this seems to be a problem on top of a problem that shouldn't exist. Monorepos can have their own CI/CD per app in the repo. No need for this complexity

1

u/Even_Gap_2253 Oct 22 '26

Question: if almost all features require this workflow, why do you even have multiple repos?

1

u/AJohnnyTruant Oct 22 '26

Something something distributed micro-monolithic macro-services something something Medium article something something

0

u/nicksenap Oct 22 '26

Yea this is more like historical reasons in the codebase of your job? e.g someone believed microservices but not monorepo and then it was built in a broken way that each features needs to each multiple service (story of my life at my previous job)

1

u/yeosu0107 17d ago

Nice. The bookkeeping is the part every shell script gets wrong. How does gw handle a worktree that was deleted by hand outside it: does status prune stale entries, or do you rely on git worktree prune?

0

u/One_Biscotti_7758 Oct 22 '26

Very cool project!!! Thank you for sharing!

2

u/[deleted] Oct 22 '26

[removed] — view removed comment

0

u/nicksenap Oct 22 '26

looks nit! will take a look thx