git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to propagate critical fixs from master to develope branch.

From
Mateusz Loskot <mateusz@loskot.net>
Date
Nov 22, 2018, 08:28 UTC
Message-ID
<CABUeae92Uxmc3xfLJ_=bScdjELL0nEMQxy+fvS+bD_7-cSVn_Q@mail.gmail.com>
In-Reply-To
<FTG.5ClN.5saZnXxVpgT.1Rzay9@seznam.cz>
On Thu, 22 Nov 2018 at 07:39, Mgr Georg Black <georg.black@seznam.cz> wrote:
> 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.

Have you considered "using git cherry-pick can be used to backport changes one by one" [1]

> 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.

rebase vs merge vs cherry-pick is a topic of constant debates and opinionated practices indeed [2]

The cherry-pick has its cons, like duplicate commits (BTW, it is a good idea to learn more about pros and cons of cherry-pick before you apply this technique). That is why workflows like GitFlow require to prepare a hotfix in a topic branch which is merged back to long-lived branch. In your case, I assume, you've done your work in long-lived master, so I think easiest is to pick that change from master and port it to the develop branch [3].

I would cherry-pick.

[1] https://www.atlassian.com/blog/git/the-essence-of-branch-based-workflows [2] https://www.atlassian.com/git/articles/git-team-workflows-merge-or-rebase [3] https://reallifeprogramming.com/git-process-that-works-say-no-to-gitflow-50bf2038ccf7

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Previous: Mgr Georg BlackNext: Andrew Ardill
Message 2 of 3 in “How to propagate critical fixs from master to develope branch.”
  1. Mgr Georg BlackNov 22, 2018
  2. Mateusz LoskotNov 22, 2018
  3. Andrew ArdillNov 23, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.