At Tuesday, 03 May 2005 11:13 Benjamin Herrenschmidt wrote: > > when accessing the remote repository, Cogito always looks for remote > > refs/heads/master first - if that one isn't there, it takes HEAD, but > > there is no correlation between the local and remote branch name. If you > > want to fetch a different branch from the remote repository, use the > > fragment identifier (see cg-help cg-branch-add). > > Ok, that I'm getting. So then, what happen of my local > refs/heads/<branchname> and refs/heads/master/ ? I'm still a bit > confused by the whole branch mecanism... It's my understanding than when > I cg-init, it creates both "master" (a head without matching branch) > and "origin" (a branch + a head) both having the same sha1. It also > checks out the tree. > > Now, when I cg-update origin, what happens exactly ? I mean, I know it's > pulls all objects, then get the master from the remote pointed by the > origin branch, but then, I suppose it updates both my local "origin" and > my local "master" pointer, right ? I mean, they are always in sync ? Or > is this related to what branch my current checkout is tracking ? If I understand this mechanics correctly then "master head" always track your local tree (i.e. with all remote and local patches applied) and "origin head" always tracking head of the remote branch from where you are getting objects. I.e. it is really a tree, not source of objects. The tree can be strored on many different hosts but it is the same across them. But the master tree have no source to sync from - you are creating it yourself locally so there is no "master branch" - only head. So if you are just tracking some other tree and do not do any merges/patches yourself then your master head will always match your remote source head ("origin" in most cases). -- Respectfully Alexey Nezhdanov - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Tue May 03 19:07:12 2005
This archive was generated by hypermail 2.1.8 : 2005-05-03 19:07:12 EST