Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么当我将更改提交到 Gerrit 上的分支时会发生冲突,但是当我在本地将更改重新设置到该分支时,git 可以进行快进重新设置并且没有任何冲突?
Gerrit 提交的行为不像 git 的合并。为什么?
Gerrit 对合并/变基非常保守。如果您的提交修改了文件,并且您尝试合并的分支也已修改,即使 git 能够自动解决冲突,Gerrit 也会因冲突而失败。这只是为了更加安全。
在较新版本的 Gerrit 中,有一个配置可以关闭此安全检查,并让 Gerrit 信任 git 的自动合并结果。