git releases management

前端 未结 3 1973
情书的邮戳
情书的邮戳 2020-12-07 18:02

I couldn\'t find anything what is the \"right\" approach to manage the releases using git. Say, I have master, release-1, release-2 and release-3 branches. Release 1 is alre

3条回答
  •  鱼传尺愫
    2020-12-07 18:25

    I would do:

    1) Merge r2 to master and then master to r3 (r3 should be able to accept all changes to master)

    2) Commit to r1, merge to r2, merge r2 to master and then merge master to r3

    3) Maybe you should use master instead of r3, and only develop on branch off r3 when the release is under preparation and merge up all changes here to master (which will be the next version). Or use "master" and "next" branch as Linux.

    4) Merge to master

    I think merging is cleaner than cherry-picking and think you should only cherry-pick when you need to backport a feature or bugfix to an older branch that you did not expect when the commit was made (else commit on the oldest branch/release you want the code on).

提交回复
热议问题