Hi Eric,

That also works.  I don't think you even need the --track.  The only
thing to remember is that if you are on one branch and do a git pull,
all the remote branches will be fetched, but only the branch you are
on will be updated to the remote copy.

so if there were changes in the remote dij and master branches, and
you were on branch master and did a git pull, it would fetch all the
remote references, but only update master to origin/master.  Going
into gitk --all would show origin/dij and dij at different places.
git checkout dij would then get you back to your local copy and git
pull would update it from origin/dij

Regards,
Luuk

On Sat, May 2, 2009 at 2:14 AM, EricP <parent.eri...@gmail.com> wrote:
> Hi Luuk,
>
> Is there a mechanism different than the one you suggested me? I mean,
> your mechanism is forcing me to do a "ckeckout". Is there a mechanism
> in Git which simply allows me to make a branch from a remote branch?
>
> How about this one:
>> git branch myBranch orig/myBranch --track
>
> Would that make sense you think?
>
> Regards,
>
> - Eric
>
>
> On Apr 23, 12:58 am, Luuk Paulussen <luuk.paulus...@gmail.com> wrote:
>> Hi Eric,
>> You should be able to do:
>>
>> git fetch origin  #This should fetch all remote refs, including the
>> remote origin/dij without updating anything locally.
>> git checkout -b dij origin/dij  #this will create a local branch
>> called dij to track origin/dij
>>
>> To reverse the effects of your initial pull, you might want to do:
>> git checkout master
>> git reset --hard origin/master  #nb, this will destroy any local
>> changes to origin master.
>>
>> git pull basically does a git fetch followed by a git merge, which is
>> not really what you wanted.  Once you have done the above, you should
>> be able to do "git pull origin" on any branch to update that branch.
>>
>> Cheers,
>> Luuk
>>
>> On Sun, Apr 19, 2009 at 6:12 AM, EricP <parent.eri...@gmail.com> wrote:
>>
>> > Hi Dan,
>>
>> > Thanks for replying to me.
>> > Here is what I get from my home computer:
>>
>> > $ git branch -a
>> > * master
>> >  network
>> >  origin/master
>> >  origin/network
>>
>> > As you can see, there is nothing about the "dij" branch that is remote
>> > and that is
>> > But this is what I get from the computer at the lab:
>>
>> > $ git branch -a
>> >  dij
>> > * master
>> >  network
>> >  origin/dij
>> >  origin/master
>> >  origin/network
>>
>> > Looks strange...
>> > Does this give you any insight about what I might have done wrong?
>>
>> > Again, what I did on my lab computer is
>> > $ git push origin dij
>>
>> > "origin" being a different computer than the one where I work (either
>> > at home or the lab).
>>
>> > And what I did on my home computer is
>> > $ git pull origin dij
>>
>> > Regards,
>>
>> > - Eric

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to