2 ms·
Well, here's a technique you can sometimes use: Start a feature branch off from the last common ancestor between your branches of interest. Make your commit a
by eru 5y ago
Well, here's a technique you can sometimes use:
Start a feature branch off from the last common ancestor between your branches of interest. Make your commit against that. Then merge that feature branch into the old release branch, current release branch and feature branch.
You might still have to do lots of conflict resolution, but at least this way you can preserve the associations in a form legible to git.
This works a bit better, if you can regularly merge your release branches back into your development branch, since then the last common ancestor will be exactly the release branch.
- Aeolun 5y agoThis sounded great, but then I realized that we have a PR based workflow. My issue with that was that I cannot resolve conflicts for all three target branches on the single branch. It works fine locally, when you just run merge and fix conflicts in one action. But I need to push my branches to bitbucket/github to go through a review process, so you can’t stay with one branch. I guess I could run the merge, and resolve the conflicts locally, then push a separate branch to make a PR with for each target with the original+merge commit inside.
- eru 5y agoI actually use this technique on a PR based workflow. In BitBucket, you can make multiple PRs from the same branch. > I guess I could run the merge, and resolve the conflicts locally, then push a separate branch to make a PR with for each target with the original+merge commit inside. Yes, that's basically what I do. Though most of the time, I don't need to bother with the merge commit, because I only do this dance to get something into both master and release, but they haven't diverged too far, yet.
- Aeolun 5y agoHaha, yeah, the reason it is a problem is because they’ve diverged so far. If you can still merge the same changes to both branches you are home free. Checking today and there’s differences in 2.5k files (out of 3.5k maybe?). To be fair, a lot of that is cleanup, but still.
- cerved 5y agoyes basically