Haris Krajina
Haris Krajina

Reputation: 15296

Managing more directly connected project on git

First let me apologize if I making duplicate question since there are very similar question but none of them address my concerns.

I have 3 projects which are "coupled", meaning that changes on one will effect the other one. Each one of them is hosted github as separate git project. Projects are:

I have need for features branching, release branching, hotfix branching and in general releasing the software.

Obviously changes on web/cli client are coupled with changes on server and when I need to branch I need to create branch on each of those projects (branches often finish on origin so whole team can collaborate). After I need to merge back to master and so forth...

I would like to avoid this and have mechanism which would allow me to branch, version at the same time. Obvious answer to this is creating parent project which would have each projects as a sub folder and in the end keeping parent project on one git repo.

My question is what would be the downside to this? Approach seems little naive and I have to wonder is there better way to achieve this? I was looking into git submodules but it seems that they provide downstream and do not allow upstream which would allow me to branch and merge across all projects. (maybe I am wrong about this).

Thank you

Upvotes: 3

Views: 62

Answers (1)

Paweł Polewicz
Paweł Polewicz

Reputation: 3852

There are some issues with submodules. Also, this is not what submodules feature in git has been created for and I would advise against using it in Your case.

You have 3 PROJECTS that are loosely related to each other, not one project in three repositories. Client application is using the Server and Web application is using the Server. Sometimes, but not always, the branch name on one project has the same name as in the other project, but from git's point of view, it's pure coincidence.

I've seen numerous development teams with a similar work environment and they have all used separate repositories and separate branches within them. Usually the work on the given topic was finished in one project days or weeks before it was even started in the other (or didn't require changing the other project at all).

If, however, You feel You need to automate this process, You could write a simple shell scripts "create-branch-on-all-projects.sh" and "merge-branch-on-all-projects.sh".

Upvotes: 1

Related Questions