문제

Why there is a conflict when I submit a change into a branch on Gerrit, but when I rebase my change onto that branch locally, git can do a fast forward rebase and without any conflict?

The behavior of Gerrit submission is not like git's merge. Why?

도움이 되었습니까?

해결책

Gerrit is very conservative with merges/rebasing. If a file has been modified by your commit has also been modified in the branch you are trying to merge with, Gerrit will fail with a conflict even if git is capable of resolving the conflict automatically. This is just to be extra safe.

In newer versions of Gerrit there is a configuration to turn this safety check off, and have Gerrit trust git's automerge results.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top