Hot-fix during the ongoing release – merge or cherry-pick?

We are trying to follow the git flow with SourceTree tool from Attlasian with all its magic buttons like: start/finish feature, start/finish release, start/finish hot-fix. So far so good, everything seems to be logical.

The tiny problem appears when we need to hot fix while we have an ongoing release branch.

So according to the git flow once we are done with the hot fix, the branch of the hot-fix is merged into master and into develop – so the SourceTree does. In a-successful-git-branching-model document is clearly stated, that it is an exceptional situation and you need to merge the hot-fix branch into the master and into the release branch, later on this hot-fix will be merged back into develop.

My problem here is that I don’t want to do this manual merging back and forth, I still want to use the magic buttons from the SourceTree tool.

So what options do I have:

  1. Cherry picking the hot-fix commit from develop into release brunch – don’t really like it, cause the history is missing
  2. Merge the whole master branch into release branch – not even sure if it’s a good idea
  3. ?

  • difference between git merge origin/master and git pull
  • GitHub Workflow for Configuration Variants?
  • Version control with MVFS
  • Lone developer but lots of xhtml css jquery work? Should i use any version control system?
  • If GIT doesn't track file renames how do we keep from losing these changes in merges?
  • How to merge features branches to branch develop in Git?
  • Is there a way to check out a single file from a master that's behind on many Git commits?
  • git ,,local push'' from feature branch to master, without checkout
  • 2 Solutions collect form web for “Hot-fix during the ongoing release – merge or cherry-pick?”

    Given that you closed your hotfix branch (and it was merged back into develop and master), if you don’t want to cherry pick the commit, I would consider just merging develop branch into your release branch (have a look first at what else has happened on develop since you started the releasebranch)

    If you want to do this exclusively via the magic buttons (no command line or manual merges) and are happy to bump another version number, you can just finish your release (merges onto master and also onto development, after your hotfix), and start a new release.

    I realised what was my problem. The flow we were using wasn’t a pure git-flow. According to the git-flow the next release is in develop branch, once it’s stable and ready to be released, a short-living(a matter of minutes) release branch is created for “dotting the i’s”. Right afterwards this branch should be finished with merging it into master branch and into develop.
    So, if we strictly follow the git-flow, there will never be a question “merge or cherry-pick during the ongoing release branch”, cause there will be no situation like this.

    Git Baby is a git and github fan, let's start git clone.