How should I incorporate a hotfix back into a feature branch using gitflow?
- by Mark Trapp
I've started using gitflow for a project, and I have an outstanding feature branch as well as a newly created hotfix. Per the gitflow workflow, the hotfix gets applied to both the master and develop branches, but nothing is said or done about extant feature branches.
Nevertheless, I'd like to incorporate the hotfix changes back into my feature branch, which as near as I can tell leaves three options:
Don't incorporate the changes. If the changes were needed for the feature branch, it should've been part of the feature branch.
Merge develop back into the feature branch. This seems to follow the gitflow workflow the best, but would cause out-of-order commits.
Rebase the feature branch onto develop. This would preserve commit order but rebasing seems to be completely absent from the general gitflow workflow.
What's the best practice here?