lukeck
lukeck

Reputation: 4758

Structure of git repos where code shared across repos needs to be in the root of the repo

I'm trying to come up with a reasonably clean way to represent the following in Git:

My current thinking is something along the lines of:

Is there a better way?

Upvotes: 1

Views: 69

Answers (1)

VonC
VonC

Reputation: 1323983

Is the code of the common project is really independent from the projects, then yes, submodules are a good choice.

But if changing the project also involve almost always changing the common code, and if the extension projects don't represent that many files... then one repo with a branch per extension project and a branch dedicated for common code could be enough.
That could then involve a bit of cherry-picking for the project-specific commits you want back in the common code branch.

Upvotes: 1

Related Questions