Bj Blazkowicz
Bj Blazkowicz

Reputation: 1177

git-flow hotfix merges onto far ahead develop

How should I handle situations where my develop branch is far ahead master and a release branch has been created from develop, but I still need to put a hotfix into production.

Should I just do it the normal way: branch hotfix from master and merge into master and develop? Is it legit to rebase my release branch onto develop after the hotfix merge?

Thanks

Upvotes: 1

Views: 224

Answers (1)

qiubix
qiubix

Reputation: 1332

Yes, it is legit. After you finish your hotfix, you obviously want to have this patch in your next release. As you described it, if you've already created release branch and started working on it, after the hotfix you need to either merge newest changes from develop (this merge commit from hotfix), or rebase this release branch onto develop. Rebase seems much better in this situation, because you'll have much clearer history.

I hope it helps :)

Upvotes: 1

Related Questions