In a project of ours we have, as usual, a master branch. Based on that is the deployment branch, where the settings are modified. Also based on that is a mirror branch that runs the mirror of the deployment. The master branch ought not contain any config changing patches.
Small features and fixes are developed in the mirror branch. So after adding a feature, it looks like this:
master: history ┐
deployment: ├─ deployment-config
mirror: └─ mirror-config ── feature
Now to move the feature back into master, I first have to reorder the patches in the mirror branch:
master: history ┐
deployment: ├─ deployment-config
mirror: └─ feature ── mirror-config
Now I can fast-forward-merge that into master
master: history ┬─ feature ┐
mirror: │ └─ mirror-config
deployment: └─ deployment-config
And then merge master into mirror, and rebasing it onto master
master: history ── feature ┐
mirror: ├─ mirror-config
deployment: └─ deployment-config
Is there a plugin or tool that would automate that, so that
- every new commit is automatically applied „below“ the top commit,
- every merge or cherry-pick is also automatically applied „below“ the top commit,
- a merge from such a branch pulls from the state „below“ the top commit?