Git hotfix branch merge

What are the best practices of merging hotfix branch into master/develop?

Do I need to merge it into both branches

hotfix → master
hotfix → develop

or merge to master and then to develop after.

hotfix → master → develop

  • Long term support using git-flow to merge a hotfix to develop branched off the support branch
  • Git-Flow undo a finished/merged hotfix branch
  • Find all dependency commits in Git
  • Git Flow Hotfix - Peer Review & merge into remote master & develop
  • How should gitflow hotfixes work?
  • Unable to create a new hotfix in a gitflow
  • Merging Git Flow Feature Branch after Hotfixes?
  • Git merge strategy for maven project hotfix releases with multiple branches
  • One Solution collect form web for “Git hotfix branch merge”

    You can merge your hotfix branch into both master and develop (according the the popular successful git branching model)

    git checkout master
    git merge --no-ff hotfix
    git checkout develop
    git merge --no-ff hotfix

    You can then delete your hotfix branch safely.

    Or use git cherry-pick <hotfix-commit-hash> on both develop and master branch.
    Cherry-picking is the easiest way to bring a single/few commit(s) into branches.

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