Git: merge only the changes made on the branch

后端 未结 4 1335
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-07 00:38
  G---H             // Release Branch
 /
/
A---B---E---F---    // master
    \\
     \\
      C---D---     // bug fix branch

Based on our particular ne

4条回答
  •  醉话见心
    2021-02-07 01:43

    There is no real danger in using cherry-pick, especially if you don't plan on ever merging the release branch into master.

    In general, you can prevent problems like these by basing bug fixes on commits that are included in all branches you want to merge the fix into. In the development of git itself, that is achieved by merging all bug fixes into the maint branch (i.e. current stable series which only receives fixes) and then merging that into master periodically. That way, the fix is everywhere and the merges are sane.

提交回复
热议问题