簡體   English   中英

成功合並后如何進行自動提交?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM