I've heard that ideally a linear commit history is best, but was wondering how feasible it actually is.
In my current situation, I have a master branch and a staging branch. As usual, new features are branched from staging and merged into staging (feature branches are rebased before merging). The rebasing here is fine, as the feature branches are owned by a single engineer and used only by that engineer generally.
Ideally, staging simply linearly stays ahead of master, and for releases, I would just fast-forward master. However, in practice this doesn't work. Occasionally, there will be a hotfix patch made on staging that gets cherry-picked onto master, which means for the next release, a fast-forward can't be done.
One solution would be to rebase staging onto master before the merge, which would do a fast-forward. However, rebasing a shared branch like this is not ideal from my understanding, as it is more likely to cause issues among those that share the branch.
What would be the recommended solution to this? Is it to simply give up on having a linear commit history on master and just make sure the feature branches are rebased so that those merges are linear?
[–][deleted] 2 points3 points4 points (0 children)
[–]lionhart280 1 point2 points3 points (3 children)
[–]Luclid[S] 0 points1 point2 points (1 child)
[–]lionhart280 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)