<div dir="ltr">So the issue is that your "origin" is set to your fork, rather<div>than to the main repository.   Unless origin is the main repo,</div><div>the recipes we're posing will not work.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 18, 2015 at 8:25 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Brad's instructions were:<br>
<span class=""> $ git checkout master<br>
 $ git pull<br>
 $ git push gitlab master<br>
<br>
</span>which did not sync.<br>
<br>
Before I added upstream, this is the result of<br>
git remote -v<br>
gerrit lorensen@review.source.kitware.com:VTK (fetch)<br>
gerrit lorensen@review.source.kitware.com:VTK (push)<br>
gitlab git@gitlab.kitware.com:lorensen/vtk.git (push)<br>
gitlab <a href="https://gitlab.kitware.com/lorensen/vtk.git" target="_blank">https://gitlab.kitware.com/lorensen/vtk.git</a> (fetch)<br>
origin git@gitlab.kitware.com:lorensen/vtk.git (fetch)<br>
origin git@gitlab.kitware.com:lorensen/vtk.git (push)<br>
stage git@vtk.org:stage/VTK.git (push)<br>
stage git://<a href="http://vtk.org/stage/VTK.git" target="_blank">vtk.org/stage/VTK.git</a> (fetch)<br>
<br>
After adding upstream<br>
git remote -v<br>
gerrit lorensen@review.source.kitware.com:VTK (fetch)<br>
gerrit lorensen@review.source.kitware.com:VTK (push)<br>
gitlab git@gitlab.kitware.com:lorensen/vtk.git (push)<br>
gitlab <a href="https://gitlab.kitware.com/lorensen/vtk.git" target="_blank">https://gitlab.kitware.com/lorensen/vtk.git</a> (fetch)<br>
origin git@gitlab.kitware.com:lorensen/vtk.git (fetch)<br>
origin git@gitlab.kitware.com:lorensen/vtk.git (push)<br>
stage git@vtk.org:stage/VTK.git (push)<br>
stage git://<a href="http://vtk.org/stage/VTK.git" target="_blank">vtk.org/stage/VTK.git</a> (fetch)<br>
upstream <a href="https://gitlab.kitware.com/vtk/vtk.git" target="_blank">https://gitlab.kitware.com/vtk/vtk.git</a> (fetch)<br>
upstream <a href="https://gitlab.kitware.com/vtk/vtk.git" target="_blank">https://gitlab.kitware.com/vtk/vtk.git</a> (push)<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Mar 18, 2015 at 7:00 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> Hi Bill,<br>
><br>
> There must be something very strange about your setup.  Can you<br>
> post your .git/config?<br>
><br>
> You shouldn't have to add "upstream" as a new remote, because<br>
> "origin" should already point to <a href="https://gitlab.kitware.com/vtk/vtk.git" target="_blank">https://gitlab.kitware.com/vtk/vtk.git</a><br>
><br>
> Also, after running SetupForDevelopment.sh, "gitlab" should be set<br>
> as a remote for your fork <a href="https://gitlab.kitware.com/lorensen/vtk.git" target="_blank">https://gitlab.kitware.com/lorensen/vtk.git</a><br>
><br>
> I can sync my fork with the vtk master without even doing a local<br>
> checkout of master:<br>
><br>
> git fetch origin<br>
> git push gitlab origin/master:master<br>
><br>
> Of course, if I wanted to checkout master, I'd use Brad's example.<br>
><br>
>  - David<br>
><br>
><br>
><br>
> On Wed, Mar 18, 2015 at 7:27 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Your suggested method to sync my repo with the vtk repo did not work for<br>
>> me.<br>
>><br>
>> This is what I needed to do:<br>
>><br>
>> Do this once:<br>
>> git remote add upstream <a href="https://gitlab.kitware.com/vtk/vtk.git" target="_blank">https://gitlab.kitware.com/vtk/vtk.git</a><br>
>><br>
>> To sync:<br>
>> git fetch upstream<br>
>> git checkout master<br>
>> git merge upstream/master<br>
>> git push<br>
>><br>
>><br>
>><br>
>> On Tue, Mar 17, 2015 at 10:46 AM, Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:<br>
>> > On 03/17/2015 01:31 PM, Bill Lorensen wrote:<br>
>> >> How do I keep my fork in sync with the vtk repo?<br>
>> ><br>
>> > Whenever you do 'git gitlab-push' to push one of your topics<br>
>> > it will also fetch 'master' from the main repo and push that<br>
>> > to your fork along with your topic.<br>
>> ><br>
>> > In general you don't need to ever reference 'master' in your<br>
>> > fork so it doesn't matter whether it stays updated.  If you<br>
>> > do want to update it manually you can do<br>
>> ><br>
>> >  $ git checkout master<br>
>> >  $ git pull<br>
>> >  $ git push gitlab master<br>
>> ><br>
>> > -Brad<br><br>
</div></div></blockquote></div><br></div></div>