- Create
hotfix-branch
fromrelease
- Commit to
hotfix-branch
- Merge
hotfix-branch
into bothrelease
anddevelop
- Simple; everybody understands it
release
anddevelop
have different histories due to differing merge parents (not really an issue if you re-branchrelease
every time)- Potential conflicts when merging into
develop
- Risk of merging release-only commits (e.g. version bumps) into
develop
- Create
hotfix-branch
fromdevelop
- Commit to
hotfix-branch
- Merge
hotfix-branch
intodevelop
- Rebase (or cherry-pick)
hotfix-branch
ontorelease
1
release
anddevelop
have the same histories (release
is fast-forwarded)- No risk of merging unwanted commits into
release
ordevelop
- Many people are uncomfortable with rebase (although in this case the rebase is non-destructive)
1 Using something like:
$ git rebase --onto hotfix-branch develop release
First, rewinding head to replay your work on top of it...
Fast-forwarded release to hotfix-branch.
Thanks for the post. I guess the git command should be fixed to:
so that
hotfix-branch
can be transplanted torelease