git branch - Git - Making Changes to Multiple Master Branches -




my small group of developers creates , maintains interfaces several different versions of our company's core product. different versions of our core product similar, there differences require keep our code in separate branch each version. in same repository.

we required switch git, , trying determine best workflow when need make same change of our branches. far, have been relying on cherry pick every commit. cumbersome , there has better way.

here example of we're doing:

v1 master:  ... (a1)--(b1)--(c1)---------(m)                               \          / v1 feature:                    (d)----(e)                                       / v2 master:  ... (a2)--(b2)--(c2)  <--? 

before merging our v1 feature onto v1 master, rebase onto v1 master. simple , makes sense since v1 feature branched off v1 master. however, want same d , e commits applied v2 master. branches similar enough commits shouldn't cause conflicts. right cherry pick them individually, , in order.

i have been searching around , can't figure out best way go this, because cherry pick can't proper way it.

note: schema not illustrate rebase, merge.

and cherry-picking works multiple commits in 1 command.
solution, provided branch cherry-picking (masterv1) never merged cherry-picking destination branch (masterv2)

that because cherry-pick duplicates commit.
, need sure commits cherry-picking have no functional dependencies based on previous commits (of source branch).





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -