Re: Commit 66203

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Komal,

On Friday, 2019-01-18 08:31:53 +0530, Komal Bharadiya wrote:

> I have been working on my first commit. But I am not able to rework on my
> patch.
> I get this on my terminal--
> ********************************************************************************************
> To ssh://logerrit:29418/core
>  ! [remote rejected]           HEAD -> refs/publish/master/66203 (you are
> not allowed to upload merges)
> error: failed to push some refs to 'ssh://komalbharadiya@logerrit
> :29418/core'
> *********************************************************************************************
> Please help, how do I resolve *CANNOT MERGE* issue?

It could had helped if you described exactly how you manoeuvred yourself
into that situation, i.e. which sequence of commands lead to a merge
commit that can't be pushed. Anyway..

First put aside (just in case your existing conflict resolution could be
reused or would come handy when resolving the merge conflict again) and
throw away your current commit(s); assuming that you are on your local
master do

  git log

Your conflict resolution probably is the second commit and the HEAD
commit is the merge commit. If so, then

  git format-patch -1 HEAD~1

which writes some 0001-your-commit-summary.patch file. Then

  git reset --hard HEAD~2

which throws away the topmost 2 commits. If your commit history is
different then please adjust the commands. Then

  git pull -r

to pull and rebase master to current state (probably you omitted the -r
to some pull in some stage earlier which lead to the merge)

Then cherry-pick the gerrit change with

  git fetch https://git.libreoffice.org/core refs/changes/03/66203/2 && git cherry-pick FETCH_HEAD

This should lead to an error message about merge conflicts.
Resolve the merge conflicts. When done

  git cherry-pick --continue

If the change is commited and builds you can push to gerrit.


If the earlier assumption that you are on your local master does not
hold but you are on a local branch instead (which is advisable), then
proceed the same but instead of

  git pull -r

issue the commands

  git fetch
  git rebase origin/master

Hope that helps.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A

Attachment: signature.asc
Description: PGP signature

_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux