I've read various git tutorials but still have some open questions regarding how git repositories & branches should be used.
Here's the situation i have:
I have a code base "A" which is maintained by external partner and I do receive source code updates every few months for it. Based on the code base "A" I've built another product "B" which is my core product. Then, I use product B as a base for my customers. Each customer has it's own small adjustments. Therefore, I maintain separate code base for each customer as well. Visually it would look something like this:
A
|
B
/ / \ \
C D F G
Now to the problem:) Every time changes occurs on code base "A" or "B", I have a daunting task to merge all changes to other code bases. I am looking for a way how to leverage Git to ease this code merge task for me.
By reading tutorials, I learned a lot. But, still I have fundamental question of how my repository/branch structure should look like. Here are my questions:
- Do I need to have repository for each code base?
- If yes, how I can perform code merges between different repositories?
Should I have one repository with multiple branches for each code base?
- what should be my master branch? A or B?
- how should the merge performed? by using rebase?
- are branches stored on the separate folders?
Is there another (better) way for solving the problem?
Any help would be great! Thanks