[英]How to do an automatic commit after successful merge?
I use this command: 我用这个命令:
git merge --commit -m="Automatic commit" --progress my_branch/master
if [ $? != 0 ]; then
echo "Merge fail"
fi
The merge was successful and do not produce any conflict. 合并成功,不会产生任何冲突。
The git command output is: git命令输出是:
Automatic merge went well; stopped before committing as requested
fatal: You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you can merge.
Why it show: stopped before committing as requested ? 为什么显示: 在按要求提交之前停止 ? I want it commit if do not exist any conflict.
如果不存在任何冲突,我希望它提交。
Any idea to make it automatic? 有什么想让它自动化吗?
stopped before committing as requested
That message should only happen when using the --no-commit
option. 只有在使用
--no-commit
选项时才会发生该消息。
As illustrated in " Mastering Git subtrees ", a git merge --squash
would also produce the same message. 如“ 掌握Git子树 ”中所示,
git merge --squash
也会生成相同的消息。
So unless (perhaps) you might have a merge already in progress, you should not see that message. 因此,除非(可能)您可能正在进行合并,否则您不应该看到该消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.