[GRASS-dev] git: how to avoid bogus merge commits

Markus Neteler neteler at osgeo.org
Wed May 22 12:59:48 PDT 2019


On Wed, May 22, 2019 at 9:44 PM Even Rouault <even.rouault at spatialys.com> wrote:
>
> On mercredi 22 mai 2019 21:30:58 CEST Markus Metz wrote:
> > Hi git gurus,
> >
> > when I modify my local copy and do git commit + git push, I sometimes get
> > an error:
> > "failed to push some refs"
> > and a hint:
> > "Updates were rejected because the remote contains work that you do not
> > have locally. This is usually caused by another repository pushing to the
> > same ref. You may want to first integrate the remote changes (e.g., 'git
> > pull ...') before pushing again."
> >
> > OK, I do "git pull" and get confronted with a merge commit message.
>
> You may do
>
> git fetch origin  (assuming 'origin' point to OSGeo/grass)
> git rebase origin/master
> git push
>
> this will rebase your local commit(s) on top of latest upstream repo

Thanks, Even,

I have updated the section
Keep your local source code up to date
https://trac.osgeo.org/grass/wiki/HowToGit#Keepyourlocalsourcecodeuptodate

best
markusN


More information about the grass-dev mailing list