git submodules, jj & vibe coding
The woes of VCS history management in a vibe-coding era
As I’m developing my AI assistant in Rust, I’m trying to break it into multiple useful libraries that can work (mostly) independently.
So I’m using a rust workspace for the project with a few sub-crates. I might not publish all those sub-crates at the same time to github. So I thought it would be useful to have separate git repos for each and use git submodules.
That way, in the future, each crate has a clean history and is easy to upload to github.
While this idea sounded great on paper, it has several downsides:
It makes working with worktrees much more painful. I created an entire
worktree-manager.shscript to try to mitigate this but it’s still painful.It makes it harder to work with jj.
The motivation for using jj comes from the fact that it seems uniquely fit to help with vibe-coding. Often, when vibe-coding, I will be iterating on a piece of code with AI over multiple iterations. I don’t always want a full git commit for every intermediate stage, but it would be nice to walk back through the different steps in case the AI is going the wrong way but I don’t want to reset to the entire beginning of the conversation.
Result: 2 mornings wasted on shell scripts
First morning to create and finesse
worktree-manager.shSecond morning to create a script to flatten my repo back into a monorepo.
I’ve published the shell scripts to my github in case these are useful to anyone.


