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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.