We have a standard web project and maintain 3 core branches for this project: Master, Beta, and Develop. Here is a summary of the process/workflow that we use:
(1) A new feature/update is requested so we create a new Feature branch.
(2) A commit is made for the new Feature branch and the Feature branch is merged into the 'Develop' branch; the 'Develop' branch is then published to a testing environment to be tested.
(3) Once the new feature is tested/approved, a new pull request is made in the same Feature branch; this new pull request is meant to be merged into the 'Beta' branch.
The 'Beta' branch has all of our "ready-to-go-live" features: in fact, we publish the 'Beta' branch directly to the production environment and when that is ready we immediately merge the 'Beta' branch to the 'Master' branch....by doing this, the 'Master' branch is always a copy of the code that is on the production environment.
The problem: in step 3 above, when we try to merge the new Feature branch into the 'Beta' branch, the pull request includes ALL new commits that have been merged into the 'Develop' branch.
Example: 5 feature branches are individually merged to the 'Develop' branch (branches are labeled 1, 2, 3, 4, and 5). All 5 are tested, but there are bugs with the first 4. So branch "5" is approved and we try to create a pull request for that Feature branch and merge it to 'Beta'....but when we do that, the pull request includes all 5 feature branches....not just the commit for branch "5".
We MUST be doing something wrong! What can we do to fix our process/workflow?
(3) Once the new feature is tested/approved, a new pull request is made in the same Feature branch; this new pull request is meant to be merged into the 'Beta' branch.
The 'Beta' branch has all of our "ready-to-go-live" features: in fact, we publish the 'Beta' branch directly to the production environment and when that is ready we immediately merge the 'Beta' branch to the 'Master' branch....by doing this, the 'Master' branch is always a copy of the code that is on the production environment.
The problem: in step 3 above, when we try to merge the new Feature branch into the 'Beta' branch, the pull request includes ALL new commits that have been merged into the 'Develop' branch.
No, that does not make sense. If that happens you have omitted important information such as:
In each of these cases your workflow is fundamentally broken and cannot work with regard to your idea of a beta branch. So if you want to avoid cherry-picking (bad! bad! bad!) how can you achieve what you want to do? There are some basic options:
That's the way git works. You'll need to create separate branches for each feature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With