Git merge branches fix

What are the best methods for combining hotfix

in master

/ develop

?

Do I need to merge it into both branches

hotfix → master
hotfix → develop

      

or drain before master

and then develop

after.

hotfix → master → develop

      

+3


source to share


1 answer


You can merge the patch branch in master

as well as in develop

(according to the popular successful git branching model ) <

git checkout master
git merge --no-ff hotfix

git checkout develop
git merge --no-ff hotfix

      



You can delete the safe patch branch.

Or use git cherry-pick <hotfix-commit-hash>

for branches develop

and master

. Cherry pick is the easiest way to bring one or more commits (s) to branches.

0


source







All Articles