1

I have multiple modules in a project say module1, module2, module3. Each project has multiple branches with structure as

project |branch1 . module1|branch1 . module2 |branch1  .  module3|
        |branch2 .        |        .         |branch2  .         |
        |branch3 .        |branch3 .         |         .         |
        |branch4 .        |        .         |branch4  .         | branch4

Project contains a list of modules to take in but the catch is, if those aren't on same branch, the code breaks.

For eg: I can keep the project on branch 1 and will need module1 and module2 on branch1, i don't care about module3 then.

P.S: I cannot keep modules with project as projects and modules are developed by different teams and merging is done by another team for proper testing of code. Also, changing of project or module before might lead to breaking.

P.P.S: Right now, We manually change branches. A visual way will be helpful as there a lot of branches.

1
  • I know you said you can't keep modules in the same repo- but that's the direction my team made since managing a variety of different modules was too complex. I don't the issue with working on the same repo and giving everyone access to that repo, as long as everything is reviewed before merging Commented Jun 26, 2019 at 20:04

1 Answer 1

2

I cannot keep modules with project as projects and modules are developed by different teams and merging is done by another team for proper testing of code

That other team can maintain a global Git repository reprenting your project and the modules checked out at their relevant commit, using git submodules

In each branch of the main project, you can checkout any module you want to any branch you want, allowing for each branch of the main project to reference only the modules needed, and only at the references needed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.