【问题标题】:Non-interactive way to create a git flow release / hotfix创建 git flow 发布/修补程序的非交互式方式
【发布时间】:2014-05-28 02:12:54
【问题描述】:

docs of gitflow 我读到以下内容:

git flow 修补程序完成 [-Fsumpkn]

-F 在执行完成之前从 $ORIGIN 获取
-s 以加密方式签署发布标签
-u 使用给定数字签名的 GPG 密钥(隐含 -s)
-m 使用给定的标签消息
-p 执行完成后推送到 $ORIGIN-k 执行完成后保留分支
-n 不要标记此版本
完成修补程序

现在我想创建一个没有用户交互的修补程序,所以我执行以下操作:

git flow hotfix finish '2.1.8' -m Hotfix

尽管有-m 标志,我进入编辑器并被要求提供标签消息:

# File /Users/me/MyProject/.git/TAG_EDITMSG  

#
# Write a tag message

我是否以错误的方式使用 git flow 或者这是一个错误?

【问题讨论】:

    标签: macos git unix terminal git-flow


    【解决方案1】:

    @Besi,您必须在修补程序分支名称之前指定选项。

    git flow hotfix finish -m Hotfix '2.1.8'
    

    该名称中也不能有空格。例如“新标签”将不起作用

    git flow hotfix finish -m 'new tag' 2.1.8
    

    错误:

    flags:FATAL the available getopt does not support spaces in options
    

    以下将起作用:

    git flow hotfix finish -m 'new_tag' 2.1.8
    

    这是一个修复完成的 git 别名:

    hf = "!_() { b=$(git rev-parse --abbrev-ref HEAD) && git co master && git pl && git co develop && git pl && git co $b && git rebase master && h=$(echo $b | sed 's/hotfix\\///g') && git flow hotfix finish -m 'new_tag' $h && git co master && git ps && git co develop && git ps && git ps --tags && git poo $b && git br -D $b;  }; _"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-30
      • 2018-03-08
      • 1970-01-01
      • 2013-01-01
      • 2012-11-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多