Reputation: 505
Doing experimental learning of git flow for my new project.. I noticed the following:
The following scenarios:
Normally git-flow workings:
git flow hotfix start 1.1.2
Will create a branch based on master and when done merges with master and develop.
Branching based on another branch
git flow hotfix start 1.1.3 support/1.x
But then the hotfix created based on support branch will merge back into that support branch and not back into develop nor master but will be tagged when finished.
Problem
If my master branch is currently in v3.2.0
but the hotfix was for an issue in a code section introduced in v1.1
but still relevant and used in the current development branch, how do I go about merging them together?
The reason for this question is that some clients would need long term support of a specific older version even if your newer version is more superior.
Possibly solution but not( using SourceTree)
Atlassian SourceTree always only merge finish hotfix with master and develop but never with the support branch that is needed by clients (tested thrice)
Upvotes: 2
Views: 715
Reputation: 1324673
If my
master
branch is currently inv3.2.0
but thehotfix
was for an issue in a code section introduced inv1.1
but still relevant and used in the current development branch, how do I go about merging them together?
Since you won't merge an hotfix
branch (where the issue was solved) into master, you can cherry-pick the relevant commit back to master
.
log view (Cmd-2), just select one or more commit lines (Cmd-click or Shift-click multi-selects), then right-click and select '
Cherry pick
'.
Upvotes: 1