Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Best way to handle multiple repositories - submodules, monorepo, or the third way?

Dmitry Linov
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 6, 2020

Many of us are familiar with the case when a project consists of several cross-used repositories (e.g., two apps and a shared library). The native Git way to handle this situation is Git Submodules, but they are not very convenient to use, to say the least. The most popular approach today is to put everything in one large monorepository, but it also has significant shortcomings (well described here). I've even met people who refuse to migrate from SVN to Git mostly because they can't imagine their life without svn:externals.

We at TMate Software have faced this problem a while ago and ended up devising a third way. We made a server-side tool that creates a directory in one repository, synchronized with another repository. All syncing is done on the server - for the end-user, it's still one regular Git repository, no need to run any special commands or push to external repositories separately. We called it 'Git X-Modules'.

We've been using this for almost a year, and it seems to do the trick. So, now you can try it out at the Marketplace.

What do you think of such an approach? Have we missed something important? For what workflows it won't fit?

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events