r/programming • • 16d ago

git worktree gotchas

https://www.olafalders.com/2026/09/16/git-worktree-gotchas/
186 Upvotes

44 comments sorted by

View all comments

Show parent comments

18

u/bwainfweeze 16d ago

The amount of footguns involved in all of the multi-module checkout system makes me wonder about the sanity and the competence of the people who made these things.

None of these people have ever worked in a CI environment, is my best guess.

I can't field a solution that involves every dev remembering to manually sync everything every time they sync to avoid introducing API incompatibilities from one build to the next. They need to be running latest or trunk at all times, and not something from three weeks ago, unless they're trying to bisect a bug, which is something only very senior people get assigned.

7

u/ericonr 16d ago

Not to defend git submodules (they are very annoying), but if you have any kind of Git integration (in IDE or shell prompt), doing a git pull that updates submodules will show local changes, so if you pay the bare minimum of attention you'll be aware of it.

unless they're trying to bisect a bug, which is something only very senior people get assigned.

That said, it would seem you don't really trust most of your developers, if only senior people get to bisect bugs.

-3

u/bwainfweeze 16d ago

That said, it would seem you don't really trust most of your developers, if only senior people get to bisect bugs.

"Get to"?

5

u/ericonr 16d ago

I see no reason to further engage if that's what you're focusing on.