[GRASS-dev] instructions to update my local copy of trunk

Veronica Andreo veroandreo at gmail.com
Sun Jun 2 18:00:49 PDT 2019


Ok, got it... the `git push origin` put my origin in sync with upstream.
So, for the way we have set remote/origin and remote/upstream, the update
goes from upstream to local and from local to origin, is that right? Is
there another way? I would have imagined, dunno why, that the update would
go from upstream to origin to local...

Anyway, I think  we need a new section here:
https://trac.osgeo.org/grass/wiki/HowToGit

Keep your fork up to date (or in sync with upstream/master)

git fetch upstream
git rebase upstream/master
git push origin


I also suggest then to remove the link to sync a fork under the section
"Workflow for core grass repository" if that is not the recommended
procedure (git fetch + git merge) because it leads to confusion in this
case.

In any case to update my local copy and recompile the source code, I could
ommit the git push origin for now, though I'll need it eventually if I make
local changes myself.

Thanks for the help :)
Vero


El dom., 2 jun. 2019 a las 22:23, Markus Metz (<
markus.metz.giswork at gmail.com>) escribió:

>
>
> On Sun, Jun 2, 2019 at 8:59 PM Veronica Andreo <veroandreo at gmail.com>
> wrote:
> >
> > Hi devs
> >
> > Following instructions here:
> https://trac.osgeo.org/grass/wiki/HowToGit#Keepyourlocalsourcecodeuptodate,
> I get:
> >
> > [veroandreo at localhost grass7_trunk]$ git remote -v
> > origin git at github.com:veroandreo/grass.git (fetch)
> > origin git at github.com:veroandreo/grass.git (push)
> > upstream git at github.com:OSGeo/grass.git (fetch)
> > upstream git at github.com:OSGeo/grass.git (push)
> >
> > [veroandreo at localhost grass7_trunk]$ git fetch upstream
> > remote: Enumerating objects: 242, done.
> > remote: Counting objects: 100% (242/242), done.
> > remote: Compressing objects: 100% (25/25), done.
> > remote: Total 296 (delta 223), reused 233 (delta 217), pack-reused 54
> > Receiving objects: 100% (296/296), 56.83 KiB | 1.18 MiB/s, done.
> > Resolving deltas: 100% (226/226), completed with 105 local objects.
> > From github.com:OSGeo/grass
> >  * [new branch]          changelog_fix_msg -> upstream/changelog_fix_msg
> >    3797ccaaf..b300e66fc  master            -> upstream/master
> >    1ca5e4e34..e1e13d782  releasebranch_7_4 -> upstream/releasebranch_7_4
> >    15f53e803..dcfce280b  releasebranch_7_6 -> upstream/releasebranch_7_6
> >
> > [veroandreo at localhost grass7_trunk]$ git branch -a
> > * master
> >   remotes/origin/master
> >   remotes/origin/releasebranch_7_0
> >   remotes/origin/releasebranch_7_2
> >   remotes/origin/releasebranch_7_4
> >   remotes/origin/releasebranch_7_6
> >   remotes/upstream/changelog_fix_msg
> >   remotes/upstream/master
> >   remotes/upstream/releasebranch_7_0
> >   remotes/upstream/releasebranch_7_2
> >   remotes/upstream/releasebranch_7_4
> >   remotes/upstream/releasebranch_7_6
> >
> > [veroandreo at localhost grass7_trunk]$ git rebase upstream/master
> > First, rewinding head to replay your work on top of it...
> > Fast-forwarded master to upstream/master.
> >
> > [veroandreo at localhost grass7_trunk]$ git status
> > On branch master
> > Your branch is ahead of 'origin/master' by 51 commits.
> >   (use "git push" to publish your local commits)
> >
> > Why does my origin/master is now ahead by 51 commits, if I have not a
> single local change?
>
> Read carefully: "Your branch is ahead of 'origin/master' by 51 commits."
> That means your local branch master is ahead of your fork at github:
> "origin git at github.com:veroandreo/grass.git"
> Your local branch master is based on "upstream git at github.com:OSGeo/grass.git",
> i.e. the original repo.
> You need to update your fork with something like
> git push origin
>
> Don't know if that helps,
>
> Markus M
>
> > I just want to get the new stuff from upstream and update my fork and
> local copy of the source code (what I used to do with `svn update`).
> >
> > Can someone please provide full instructions [ideally in
> https://trac.osgeo.org/grass/wiki/HowToGit#Keepyourlocalsourcecodeuptodate
> ]?
> >
> > Thanks much in advance
> > Vero
> >
> >
> >
> >
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20190603/a09f338c/attachment.html>


More information about the grass-dev mailing list