gpt4 book ai didi

maven - jgitflow :release-finish is not deleting the release branch

转载 作者:行者123 更新时间:2023-12-04 01:31:12 27 4
gpt4 key购买 nike

我最近完成了使用 jgitflow:release-finish 合并一个发布分支来掌握和开发。 .构建成功。

enter image description here

但是现在我正在尝试使用 jgitflow:releast-start 创建一个新分支.但它给出了以下错误。

[ERROR] Failed to execute goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5.1:release-start (default-cli) on project <XXXXXXX>: Error starting release: Error starting release: a release branch [refs/remotes/origin/release/1.0.1] already exists. Finish that first! -> [Help 1]

当我运行 jgitflow:release-start 时,它问了我以下问题我输入它为 1.0.2。
What is the release version for "XXXXXXX"? (org.XXX.automation:XXXXXXX) [1.0.2]: 1.0.2

但它仍然给出以下错误。我很困惑。

问题 :
  • 我们应该手动删除 release-1.0.1 分支吗?
  • 如果是,我将失去历史。有什么办法可以保存吗?
  • 最佳答案

    1) Should we delete the release-1.0.1 branch manually? 2) If yes, I will losing the history. Is there any way to preserve that?



    根据 gitflow ,这个 Maven 插件背后的理念,发布分支是临时分支,之后应该删除:

    Now we are really done and the release branch may be removed, since we don’t need it anymore:

    $ git branch -d release-1.2
    Deleted branch release-1.2 (was ff452fe).


    然后合并发布准备和完成的更改,因此其更改的历史在大多数情况下是无关紧要的。

    但是,作为 gitflow 的变体,可以采用不同的方法(但显然插件不直接支持):保留一个长期存在的发布分支,用于所有版本和 rebase它来自 develop在准备好准备/执行发布时创建一个新分支而不是创建一个新分支。

    另请注意 release:finish 目标提供了 keepbranch 选项:

    Whether to keep the release branch after finishing the release.



    默认值为 false ,因此默认情况下它不应该保留发布分支。

    关于maven - jgitflow :release-finish is not deleting the release branch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37880781/

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