gpt4 book ai didi

maven - mvn jgitflow :release-finish is merging release --> master --> develop

转载 作者:行者123 更新时间:2023-12-01 22:23:56 25 4
gpt4 key购买 nike

我在用的时候

mvn jgitflow:release-finish

我注意到发布分支已合并到主分支。

问题:这是正确的方法吗?

抱歉,我的问题可能很幼稚,因为我是新手。我在想 release 分支的代码将合并到 develop 和 master 而不是 release --> master --> develop。

问题:如果我不希望这种情况发生,而是我应该能够从 master rebase develop 怎么办?

最佳答案

When I was using mvn jgitflow:release-finish I noticed that the release branch got merged into master branch. Is this the correct way?

根据背后的主要理念,这是正确的方法,gitflow :

Release branches

  • May branch off from:develop
  • Must merge back into: develop and master

并根据插件documentation , release-finish 确实合并回 master 和 dev 分支:

finishing a release - runs a maven build (deploy or install), merges the release branch, updates pom(s) with development versions

这是有道理的,因为(再次回到 gitflow ):

When the state of the release branch is ready to become a real release, some actions need to be carried out. First, the release branch is merged into master (since every commit on master is a new release by definition, remember). Next, that commit on master must be tagged for easy future reference to this historical version. Finally, the changes made on the release branch need to be merged back into develop, so that future releases also contain these bug fixes.


I was thinking that the code from release branch will merge to develop and master and not like release --> master --> develop.

顺序遵循此流程(首先是 master,然后是开发),因为它是一个版本,作为一个版本,它必须首先进入 master(它应该始终代表已发布的代码库),然后是开发(whish 是下一个潜在的版本代码库)。


What if I don't want this to happen and instead I should be in a position to rebase develop from master.

您可以使用 noReleaseMerge选项:

Whether to turn off merging changes from the release branch to master and develop

默认值为false,因此默认执行合并。但是,该选项涵盖了两个合并,您不能只禁用其中一个,它要么都禁用(同样,遵循 gitflow 哲学)要么一个都不禁用。此选项可能适合您的需要,但您随后会通过 git 命令执行其他操作。

关于maven - mvn jgitflow :release-finish is merging release --> master --> develop,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37876597/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com