[vtk-developers] Keeping in fork in sync

David Gobbi david.gobbi at gmail.com
Wed Mar 18 22:33:05 EDT 2015


So the issue is that your "origin" is set to your fork, rather
than to the main repository.   Unless origin is the main repo,
the recipes we're posing will not work.

On Wed, Mar 18, 2015 at 8:25 PM, Bill Lorensen <bill.lorensen at gmail.com>
wrote:

> Brad's instructions were:
>  $ git checkout master
>  $ git pull
>  $ git push gitlab master
>
> which did not sync.
>
> Before I added upstream, this is the result of
> git remote -v
> gerrit lorensen at review.source.kitware.com:VTK (fetch)
> gerrit lorensen at review.source.kitware.com:VTK (push)
> gitlab git at gitlab.kitware.com:lorensen/vtk.git (push)
> gitlab https://gitlab.kitware.com/lorensen/vtk.git (fetch)
> origin git at gitlab.kitware.com:lorensen/vtk.git (fetch)
> origin git at gitlab.kitware.com:lorensen/vtk.git (push)
> stage git at vtk.org:stage/VTK.git (push)
> stage git://vtk.org/stage/VTK.git (fetch)
>
> After adding upstream
> git remote -v
> gerrit lorensen at review.source.kitware.com:VTK (fetch)
> gerrit lorensen at review.source.kitware.com:VTK (push)
> gitlab git at gitlab.kitware.com:lorensen/vtk.git (push)
> gitlab https://gitlab.kitware.com/lorensen/vtk.git (fetch)
> origin git at gitlab.kitware.com:lorensen/vtk.git (fetch)
> origin git at gitlab.kitware.com:lorensen/vtk.git (push)
> stage git at vtk.org:stage/VTK.git (push)
> stage git://vtk.org/stage/VTK.git (fetch)
> upstream https://gitlab.kitware.com/vtk/vtk.git (fetch)
> upstream https://gitlab.kitware.com/vtk/vtk.git (push)
>
> On Wed, Mar 18, 2015 at 7:00 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> > Hi Bill,
> >
> > There must be something very strange about your setup.  Can you
> > post your .git/config?
> >
> > You shouldn't have to add "upstream" as a new remote, because
> > "origin" should already point to https://gitlab.kitware.com/vtk/vtk.git
> >
> > Also, after running SetupForDevelopment.sh, "gitlab" should be set
> > as a remote for your fork https://gitlab.kitware.com/lorensen/vtk.git
> >
> > I can sync my fork with the vtk master without even doing a local
> > checkout of master:
> >
> > git fetch origin
> > git push gitlab origin/master:master
> >
> > Of course, if I wanted to checkout master, I'd use Brad's example.
> >
> >  - David
> >
> >
> >
> > On Wed, Mar 18, 2015 at 7:27 PM, Bill Lorensen <bill.lorensen at gmail.com>
> > wrote:
> >>
> >> Your suggested method to sync my repo with the vtk repo did not work for
> >> me.
> >>
> >> This is what I needed to do:
> >>
> >> Do this once:
> >> git remote add upstream https://gitlab.kitware.com/vtk/vtk.git
> >>
> >> To sync:
> >> git fetch upstream
> >> git checkout master
> >> git merge upstream/master
> >> git push
> >>
> >>
> >>
> >> On Tue, Mar 17, 2015 at 10:46 AM, Brad King <brad.king at kitware.com>
> wrote:
> >> > On 03/17/2015 01:31 PM, Bill Lorensen wrote:
> >> >> How do I keep my fork in sync with the vtk repo?
> >> >
> >> > Whenever you do 'git gitlab-push' to push one of your topics
> >> > it will also fetch 'master' from the main repo and push that
> >> > to your fork along with your topic.
> >> >
> >> > In general you don't need to ever reference 'master' in your
> >> > fork so it doesn't matter whether it stays updated.  If you
> >> > do want to update it manually you can do
> >> >
> >> >  $ git checkout master
> >> >  $ git pull
> >> >  $ git push gitlab master
> >> >
> >> > -Brad
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150318/fa1c6327/attachment-0001.html>


More information about the vtk-developers mailing list