[sr-dev] problem with tracking master

Alex Hermann alex at speakup.nl
Thu Sep 8 11:40:58 CEST 2011


On Thursday 08 September 2011, Juha Heinanen wrote:
> Alex Hermann writes:
> > When in you mtree branch, 'git pull' will pull changes from master.
> 
> alex,
> 
> thank you for your answer.  i thought too that it works like than, but
> it doesn't.

Is local mtree branch supposed to track master?


> just to make sure, i just cloned sip-router again:
> 
> /usr/src/orig$ mkdir sip-router
> /usr/src/orig$ git clone ssh://jh@git.sip-router.org/sip-router
> Cloning into sip-router...
> jh at git.sip-router.org's password:
> Receiving objects:  24% (30355/123106), 14.38 MiB | 355 KiB/s
> remote: Total 123106 (delta 86469), reused 117147 (delta 81991)
> Receiving objects: 100% (123106/123106), 31.57 MiB | 295 KiB/s, done.
> Resolving deltas: 100% (86469/86469), done.
> 
> then i created a local branch called 'jh' that tracks remote head
> jh/mtree:
> 
> /usr/src/orig/sip-router$ git checkout --track -b jh
> remotes/origin/jh/mtree Branch jh set up to track remote branch jh/mtree
> from origin.
> Switched to a new branch 'jh'
> 
> then i do pull:
> 
> /usr/src/orig/sip-router$ eg pull
> jh at git.sip-router.org's password:
> Already up-to-date.
> 
> and after that lib/srdb1/schema/entities.xml does not contain the change
> that i did to master this morning.

From the above commands, I don't see why it should. Local branch jh tracks 
origin/jh/mtree, not master. So why would a master change suddenly appear in 
the jh branch? I would expect changes you push to origin/jh/mtree to appear in 
your local jh branch after a pull, nothing else.

disclaimer: I always use EasyGit, but i expect these fundamentals to be the 
same in bare git and EasyGit mentions no differences on this subject.

-- 
Greetings,

Alex Hermann




More information about the sr-dev mailing list