Reputation: 4460
I have a project which has pieces of it that are used by another project. For explanation, let's say my project is A, his project is B, and the common code overlap region is C, like a Venn Diagram.
Is there a way we can easily keep this C up to date with each other using git? We would prefer to keep using two different repos, one for each project.
I imagine this happens with open source software all the time. What is the common practice used there?
Upvotes: 1
Views: 26
Reputation: 72755
C would be a separate project (and hence repository). Both your repositories (A and B) would add C as a submodule and use it.
Either that or, if C is a something like a library, A and B would use a prebuilt version that's specified as a dependency rather than use it from source directly.
Upvotes: 1