github.com/Pankov404/juju@v0.0.0-20150703034450-be266991dceb/doc/contributions/forward-porting-bugs.md (about) 1 juju and Forward Porting Bug Fixes 2 ================================== 3 4 When fixing a bug that affects more than a single branch the prefered 5 process for fixing the bug is to perform the work against the oldest 6 branch and then forward port that bug back up to each release branch 7 and finally in to master. 8 9 For example, if a bug is reported to impact R1, R2, and master. You 10 would perform the work against a branch of R1. When your fix is ready 11 you would use the pull request and review process. See: [reviewboard] 12 Then you would forward port that fix to R2, and finally once your fix 13 was merged in to R2, you would forward port the fix to current master. 14 15 How To Forward Port 16 =================== 17 18 Once your inital fix has been merged by the bot the process of forward 19 porting can be done with a few git commands. In this example I will show 20 forward porting the fix in to master. 21 22 You will want to locate the SHA for the merge commit that was generated 23 by jujubot. This will be viewable on github or in your git log output. 24 Copy the SHA since we will use it to cherry-pick the fix in to master. 25 26 git checkout master 27 git checkout -b <fixed-branch-name> 28 git cherry-pick -m 1 <merge-commit-sha> 29 30 You may have some minor merge conflicts with the cherry-pick that need 31 to be fixed, this is rare when forwarding porting, but occasionally it 32 does happen. 33 34 git push your-remote <fixed-branch-name> 35 36 Now your new branch is ready to follow the same pull request and review 37 process as the original fix. Be sure to note that this is a forward port 38 and link to the previous review.