Assume the following scenario. Lets say you have a file called foo.bar. It has a main branch and a release branch (lets call it r1). r1 has not yet been released, but the developer needs to work on a new project based off of r1. So we branch r2 off of r1. r1 finishes and needs to merge to main to be released. Can you merge r1 to main before finishing/merging r2 (do all children branches need to be merged into the parent, before the parent merges to main)? Our current policies do not allow us to merge r2 content into r1. So we would have to merge r1 to main then r2 to main. Is it possible to skip the merge from r2 into r1 and go directly to main if r1 is in main?
We are not sure if this branching/merging scenario is possible. We currently branch everything off of main (no branches off of branches), but this causing issues when release branches are dependent on each other. Example, r2 needs r1's code to compile, but does not need to change r1's code. Currently we merge the code from r1 into r2, even if we do not need to change the code. We were hoping that it would be possible to branch off of a branch so that r2 can inherit from r1 without merges, but we cannot merge r2 back into r1. They both have to merge directly to main. Although the parent branch will always merge to main before the child.