[英]How to do an automatic commit after successful merge?
我用這個命令:
git merge --commit -m="Automatic commit" --progress my_branch/master
if [ $? != 0 ]; then
echo "Merge fail"
fi
合並成功,不會產生任何沖突。
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.
為什么顯示: 在按要求提交之前停止 ? 如果不存在任何沖突,我希望它提交。
有什么想讓它自動化嗎?
stopped before committing as requested
只有在使用--no-commit
選項時才會發生該消息。
如“ 掌握Git子樹 ”中所示, git merge --squash
也會生成相同的消息。
因此,除非(可能)您可能正在進行合並,否則您不應該看到該消息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.