I have a gerrit change which has merge conflict with master, when I cherry-pick the change, it says
error: could not apply 0819af2... Test change
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
# now git status is as below...
$ git status
## master...origin/master
UU path/to/file
I usually open the conflict file in a editor, resolve the conflict and upload the change to gerrit (it gets amended), but how to do the rebase using script so it always picks the change from gerrit being cherry-picked (overwrite whatever is present locally - usually the master), so I can upload the gerrit change without manual intervention? here is what I like to do:
git clone a project
apply the gerrit# 1234, if there is conflict, pick the changes from change #1234, overwriting whatever is cloned in current working dir.
Amend the gerrit, so it is rebased now.