In the company we have a big repository BIG-REPO. I stores code base for all applications, services tools etc. Now my team is working on Web Application A. This application has dependencies on other parts of the BIG-REPO. Because in our team I want to introduce code review with pull requests, and also to have a stable branch for our application, I came up with this workflow:
- we have shared feature branch for our application, let's call this branch WebAppA branch
- each developer is working on some features for this application. When doing so, he/she creates a branch from WebAppA. So for instance we have WebAppAFeatureA and WebAppAFeatureB etc. Developers constantly push their branches to remote and issue PR to WebAppA. I do code review & merge changes. And also developers update their feature branches by rebasing to WebAppA. So far so good right?
- But because WebAppA has dependencies on other parts of the repository, that are developed by other teams, we sometimes need to incorporate their changes (which are already in master) into our WebAppA branch. And now the question I have: how to do it safely? Is it even possible?
Options I see are:
a) merging master into WebAppA. Drawbacks: I have merge commits. And I'm also not sure what will happen when I need to merge WebAppA back to master (for instance once a milestone is finished). Would it be ok/safe? It would look awkward in history: first I merge master into WebAppA , then I do otherwise.
b) rebasing WebAppA to master. From what I understand of how git works, this is a disaster as it will constantly change WebAppA history. And because this is shared branch then it will destroy everything (Golden Rule Of Rebase).
I don't have any other ideas. Could you advice?