{"thread":{"id":"49880","subject":"How to propagate critical fixs from master to develope branch.","startedAt":"2018-11-22T06:39:11Z","lastAt":"2018-11-23T02:00:51Z","messageCount":3,"participants":["Mgr Georg Black","Mateusz Loskot","Andrew Ardill"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"363871","messageId":"FTG.5ClN.5saZnXxVpgT.1Rzay9@seznam.cz","threadId":"49880","inReplyTo":null,"subject":"How to propagate critical fixs from master to develope branch.","fromName":"Mgr Georg Black","fromEmail":"georg.black@seznam.cz","sentAt":"2018-11-22T06:39:05Z","receivedAt":"2018-11-22T06:39:11Z","isPatch":false,"sender":{"key":"georg.black@seznam.cz","avatar":null},"body":"Hello everyone.I red git manual but I can't figure out how to propagate critical change from master branch to long live develop branch. I red chapter about rebasing that I think could solve it but at the end of this chapter is written that it's not recommended for pubic repositories. I don't know how to do it without merging develop branch to master.\nI'll appreciate list of orders very much. :-)\nThanks for any info or link.\nGB\n\n"},{"id":"363874","messageId":"CABUeae92Uxmc3xfLJ_=bScdjELL0nEMQxy+fvS+bD_7-cSVn_Q@mail.gmail.com","threadId":"49880","inReplyTo":"FTG.5ClN.5saZnXxVpgT.1Rzay9@seznam.cz","subject":"Re: How to propagate critical fixs from master to develope branch.","fromName":"Mateusz Loskot","fromEmail":"mateusz@loskot.net","sentAt":"2018-11-22T08:28:53Z","receivedAt":"2018-11-22T08:29:22Z","isPatch":false,"sender":{"key":"mateusz@loskot.net","avatar":"https://gravatar.com/avatar/fe5a0ce8995d4986f5c46aad6353e21717808da58e4bc710da1a100e247be239?d=mp&s=160"},"body":"On Thu, 22 Nov 2018 at 07:39, Mgr Georg Black <georg.black@seznam.cz> wrote:\n> Hello everyone.I red git manual but I can't figure out how to propagate critical change from master branch to long live develop branch.\n\nHave you considered \"using git cherry-pick can be used to backport\nchanges one by one\" [1]\n\n> I red chapter about rebasing that I think could solve it but at the end of this chapter is written that it's not recommended for pubic repositories. I don't know how to do it without merging develop branch to master.\n\nrebase vs merge vs cherry-pick is a topic of constant debates and\nopinionated practices indeed [2]\n\nThe cherry-pick has its cons, like duplicate commits (BTW, it is a\ngood idea to learn more about pros and cons of cherry-pick before you\napply this technique).\nThat is why workflows like GitFlow require to prepare a hotfix in a\ntopic branch which is merged back to long-lived branch.\nIn your case, I assume, you've done your work in long-lived master, so\nI think easiest is to pick that change from master\nand port it to the develop branch [3].\n\nI would cherry-pick.\n\n[1] https://www.atlassian.com/blog/git/the-essence-of-branch-based-workflows\n[2] https://www.atlassian.com/git/articles/git-team-workflows-merge-or-rebase\n[3] https://reallifeprogramming.com/git-process-that-works-say-no-to-gitflow-50bf2038ccf7\n\nBest regards,\n-- \nMateusz Loskot, http://mateusz.loskot.net\n"},{"id":"363954","messageId":"CAH5451mb894U4GGWRkax2XPr7GGQYmMezHvJM5BCyqR=BETL=w@mail.gmail.com","threadId":"49880","inReplyTo":"FTG.5ClN.5saZnXxVpgT.1Rzay9@seznam.cz","subject":"Re: How to propagate critical fixs from master to develope branch.","fromName":"Andrew Ardill","fromEmail":"andrew.ardill@gmail.com","sentAt":"2018-11-23T02:00:13Z","receivedAt":"2018-11-23T02:00:51Z","isPatch":false,"sender":{"key":"andrew.ardill@gmail.com","avatar":"https://gravatar.com/avatar/da14cb7c091dd44dc6c63a4d3361b149acaf25226dc78eb4131a17b93d9b0993?d=mp&s=160"},"body":"Hi GB,\n\nOn Fri, 23 Nov 2018 at 04:23, Mgr Georg Black <georg.black@seznam.cz> wrote:\n>\n> Hello everyone.I red git manual but I can't figure out how to propagate critical change from master branch to long live develop branch. I red chapter about rebasing that I think could solve it but at the end of this chapter is written that it's not recommended for pubic repositories. I don't know how to do it without merging develop branch to master.\n> I'll appreciate list of orders very much. :-)\n> Thanks for any info or link.\n> GB\n\nA lot of what to do comes down to how you and your team work, and your\nongoing maintenance needs are.\n\nThe two methods I've seen used are to either cherry-pick the critical\nchange on top of whichever branches need it, or to build the change\nfrom the oldest branch point that has the error, and then merging\nthose changes up to any maintained branches.\n\nThe cherry-pick method is quick and dirty, and doesn't require much\nmessing about.\n\nThe 'hotfix branch' method requires a bit more work to set up, but can\nmake it easier to see where the change is coming from and where it has\nbeen applied. This fits in with the 'git flow' development methodology\n(but doesn't require it).\n\nA pretty good discussion of these ideas can be found at\nhttps://stackoverflow.com/questions/7175869/managing-hotfixes-when-develop-branch-is-very-different-from-master\n\nRegards,\n\nAndrew Ardill\n"}]}