Error while pushing commits for bug 93240

Norbert Thiebaud nthiebaud at gmail.com
Sat Aug 29 12:26:34 PDT 2015


On Sat, Aug 29, 2015 at 12:21 PM, Daniel <danlrobertson89 at gmail.com> wrote:
> In general as opposed to merging origin/master you would be better off
> using rebase origin/master.

To add to that: it is not just 'in general'
for this project it is a rule. no merge commit.

when refreshing you local master always use 'git pull -r'

now, Shreyansh:

1/ You _really_ need to spend some time to read a git primer.. there
are plenty of them on the internet, text, slideshow, video etc,
explaining it in all kind of ways, I'm just you'll find one that
resonate with you.

2/ you _really_ need to read what the tools are telling you when you
run a command:

for example:

> $ git push --set-upstream origin my_93240

where did you get that from?. this command tell gerrit to push you
branch my_93240 to a branch of the same name on origin and remember
that association for the next time
no surprizingly:
To ssh://logerrit/core
 ! [remote rejected] my_93240 -> my_93240 (prohibited by Gerrit)

Yes you are prohibited to create random branches on the upstream repo.

then
> ./logerrit submit master
[..]]
>! [remote rejected] HEAD -> refs/for/master (change 9724 closed)

even if that does not talk to you google of "! [remote rejected] HEAD
-> refs/for/master (change 9724 closed)"

In any case you should really understand what you are trying to push

git log --decorate goes a long way.

next:

> git push origin HEAD:master
remote: Branch refs/heads/master:
remote: You are not allowed to perform this operation.
remote: To push into this reference you need 'Push' rights.
remote: User: phenom
remote: Please read the documentation and contact an administrator
remote: if you feel the configuration is incorrect
remote: Processing changes: refs: 1, done
To ssh://logerrit/core
 ! [remote rejected] HEAD -> master (prohibited by Gerrit)

you ask again: How should I fix this?
by readin the long and clear message:
remote: You are not allowed to perform this operation.
remote: To push into this reference you need 'Push' rights.
remote: User: phenom
remote: Please read the documentation and contact an administrator
remote: if you feel the configuration is incorrect

you are trying to push directly to master, bypassing gerrit review
altogether, of course that is not allowed.

finally:

>git push origin HEAD:refs/for/master
[...]
> ! [remote rejected] HEAD -> refs/for/master (you are not allowed to upload merges)

yaou said : "same result"
Well again read the message. no it is not the 'same result' not even close.
This time you would be allowed to push to the destination you
indicated.. but you are trying to push
a merge commit, which the message is clearly telling you you are not
allowed to do.

your subsequent git log show a 'merge commit' and a puzzling 'initial
commit' in you history...
I have no idea how you got there.. but as the first Law of Holes
state: if you find yourself in a hole, stop digging.

The random try and error method require that you go back to a known
sane state between tries.


Norbert


More information about the LibreOffice mailing list