【发布时间】:2017-02-14 01:30:28
【问题描述】:
我正在为 Windows 中的 git-flow 自动化编写 Bash 脚本。
问题是:当我从 cmd 调用 git flow release finish MYRELEASE -m "MESSAGE" 时,它运行时不要求输入(期望的行为)。但是当我从 Git Bash (MINGW64) 执行相同操作时,它会要求合并消息(启动 vim),这是我想避免的。
我尝试在两个控制台中将 git-config 设置为 git config --global core.mergeoptions --no-edit,但结果是一样的:Git Bash 总是要求合并消息。
- 为什么控制台的行为不同?
- 如何让 Git Bash 停止请求合并消息?
更新:
两个控制台中git flow release finish 1.1.4 -m "v1.1.4" --showcommands 的输出是
git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
git merge --no-ff release/1.1.4
Already up-to-date!
Merge made by the 'recursive' strategy.
git tag -a -m v1.1.4 1.1.4 1.1.4
git checkout develop
Switched to branch 'develop'
Your branch is up-to-date with 'origin/develop'.
git merge --no-ff 1.1.4
Already up-to-date!
Merge made by the 'recursive' strategy.
git branch -d release/1.1.4
Deleted branch release/1.1.4 (was 0a774fe).
Summary of actions:
- Release branch 'release/1.1.4' has been merged into 'master'
- The release was tagged '1.1.4'
- Release tag '1.1.4' has been back-merged into 'develop'
- Release branch 'release/1.1.4' has been locally deleted
- You are now on branch 'develop'
【问题讨论】:
-
如果您将
--showcommands添加到git flow release命令中,您在cmd 与Git Bash 中得到什么输出? -
感谢您的编辑@ScottWeldon,非常感谢。谢谢回复,我试过了。输出是一样的,请看我的更新。我找到了解决方案,请参阅我的答案。尽管如此,还是感谢您的努力!