Git merging hotfix to multiple branches

后端 未结 4 1011
-上瘾入骨i
-上瘾入骨i 2021-02-01 16:48

I\'ve been trying to wrap my head around git branching models. I\'ve been looking at http://nvie.com/posts/a-successful-git-branching-model/ for some ideas and coming from Subv

4条回答
  •  心在旅途
    2021-02-01 17:38

    I've been struggling with this question, too, and I think if you're willing to change your versioning strategy a little (i.e., depart from the -SNAPSHOT versions that Maven encourages), this could be solved by using a fixed version (like SNAPSHOT or 0.0.0-SNAPSHOT) on master (or whatever your development branch is). (The SNAPSHOT suffix is important, if you're using Maven, since Maven treats SNAPSHOT-versioned artifacts differently than others.)

    In fact, I think you'd want to institute a policy of only ever changing the version number on your production branch (the one from which you build releases) or on branches which are for release purposes only (e.g., changing version numbers) and which you never intend to merge back to the development branch.

    I haven't actually used this strategy yet, but was just thinking about it, and I think I'll start trying it.

提交回复
热议问题