I developed some tools specifically to facilitate this process with git, and last week I wrote an extensive blog article about them. In particular, the git cherry-menu command referenced by this post can accept an arbitrary list of commits for backup, so using git log and your favorite text editor, you can create a fairly carefully selected list of commits that make up the critical backported function. and then run something like:
git checkout -b release-2.0.y release-2.0.x git cherry-menu cat commits-to-backport.txt
This is similar to the suggestion of reinstalling kan, except that the backporting process is more structured, and using the git notes under the hood, you get several convenient additional functions, including the fact that all metadata describing the process is saved for several git cherry-menu runs.
Of course, if you only have a few backup commits, kan is right that you can just simply select the cherry directly.
Unfortunately, I think the accepted answer is a bit contradictory:
The whole idea of backporting features looks broken for me. Only critical and non-destructive changes should be considered. For features and enhancements, you need to create a new branching period and begin stabilization.
because the creation of a new branch and the beginning of the stabilization period is still the opposite. The only difference is which branch you decide to put backup transactions in! You can either put them in the source branch release-2.0.x , or a branched branch, like the branch release-2.0.y above. It’s generally safer / cleaner to do the latter (and I think that Ivan points out), but actually it depends on how you organize your repositories and branches. He still does not avoid the need to make cherry picks and potential conflict resolution.
Adam spiers
source share