例如合并错误或重新设置错误。它具有唯一的错误代码吗? 最佳答案 我将测试设置为失败。这就是我得到的:$ git merge newbranch Auto-merging test.txt CONFLICT (content): Merge conflict in test.txt Automatic merge failed; fix conflicts and then commit the result. $ echo $? 1 当Git正确合并时,它会按预期返回0。