Hacker News new | ask | show | jobs
by jayd16 2437 days ago
Whats the current state of git submodules? It seems like you could get some of the benefits of mono-repos in that you can reference dependency projects directly like a mono-repo. You can, in theory, treat many projects like a single code base.

I don't see it used very often though. Why not?

2 comments

Even with submodules it's still a PR per repo. Global, atomic changes are super powerful.
There is another tool called git-subtree that should solve these problems, I think. But I've never seen it in use
git subtree is just a wrapper around subtree merges, I don't think they solve the same problem as submodules.
Good point! Hmm. Maybe git(hu|la)b could solve this with some kind of pull request batching.
Because if some change requires you to make commits to 3 repos, submodule approach will require to make 4 commits instead. Very annoying.