Error while pushing commits for bug 93240

Daniel danlrobertson89 at gmail.com
Sat Aug 29 10:21:20 PDT 2015


Shreyansh,

This may already have been answered, but after looking at your pastebin
it looks like you have three local commits. So I think you'll have to
re-write a bit of history before you commit.

You could try something like the following

git rebase -i HEAD~3

This will drop you into your favorite editor with something like the
following at the top of the file.

pick ec51cbb Initial commit
pick 2c6e661 Merge branch 'master' of http://anongit.freedesktop.org/git/libreoffice/core
pick 9904508 tdf#93240: replace boost::ptr_container with std::unique_ptr

I don't know what is in the commits, so I can't tell you exactly what to
do, but from the commit messages, I can assume you can delete the first
commit "Initial commit" by removing the line. Then things get more
complicated especially if any of the work you did in the third commit is
based off of anything included from the merge commit. The easiest method
I can hope will work is to also delete the merge commit line. So you'll
be left with the following at the top of the file.

pick 9904508 tdf#93240: replace boost::ptr_container with std::unique_ptr

save and close the file and then try the following

git rebase origin/master
git push origin HEAD:refs/for/master

In general as opposed to merging origin/master you would be better off
using rebase origin/master. Reason being, merging adds a commit in the
log, while rebasing merely applys your commits past the common commit to
the last commit of origin/master.

I'm still a noobie to this project, so I can't promise this will work
or is the cause of the problem you're facing, but I hope it helps! If
you would like more information about rebasing I would strongly suggest
the Rewriting History section of Pro Git.

Book:
    http://www.git-scm.com/book/en/v2

Rewriting History section:
    http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History

Hope it helps!

Best,

Daniel

On Fri, Aug 28, 2015 at 10:04:47AM +0000, Shreyansh Gandhi wrote:
> *./logerrit submit master*
> Counting objects: 64, done.
> Delta compression using up to 4 threads.
> Compressing objects: 100% (10/10), done.
> Writing objects: 100% (11/11), 1.15 KiB | 0 bytes/s, done.
> Total 11 (delta 8), reused 0 (delta 0)
> remote: Resolving deltas: 100% (8/8)
> remote: Processing changes: refs: 1, done
> To ssh://logerrit/core
>  ! [remote rejected] HEAD -> refs/for/master (change 9724 closed)
> error: failed to push some refs to 'ssh://logerrit/core'
> 
> 
> On Fri, Aug 28, 2015 at 2:51 PM Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
> wrote:
> 
> > Try
> >
> > ./logerrit submit master
> >
> >
> > Check https://wiki.documentfoundation.org/Development/gerrit for more
> > information.
> >
> > Samuel
> >
> >
> > Am 28.08.2015 um 10:58 schrieb Shreyansh Gandhi:
> >
> > Hi,
> >
> > I'm unable to figure out why my commits are not being pushed.
> >
> >  *$ git push --set-upstream origin my_93240 *
> > Counting objects: 61, done.
> > Delta compression using up to 4 threads.
> > Compressing objects: 100% (10/10), done.
> > Writing objects: 100% (11/11), 1.15 KiB | 0 bytes/s, done.
> > Total 11 (delta 8), reused 0 (delta 0)
> > remote: Resolving deltas: 100% (8/8)
> > remote: Processing changes: refs: 1, done
> > To ssh://logerrit/core
> >  ! [remote rejected] my_93240 -> my_93240 (prohibited by Gerrit)
> > error: failed to push some refs to 'ssh://logerrit/core'
> >
> > How do I fix this?
> >
> > Regards,
> > Shreyansh
> > --
> > Regards,
> > Shreyansh Gandhi
> >
> >
> > _______________________________________________
> > LibreOffice mailing listLibreOffice at lists.freedesktop.orghttp://lists.freedesktop.org/mailman/listinfo/libreoffice
> >
> >
> > --
> Regards,
> Shreyansh Gandhi

> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150829/44f78c78/attachment.sig>


More information about the LibreOffice mailing list