From: Jakub Narebski Date: Thu, 18 Jun 2009 14:17:06 GMT Subject: Re: [RFC/PATCH 1/2] remote tracking: return the tracking branch for the given branches Message-ID: <200906181617.07802.jnareb@gmail.com> In-Reply-To: On Thu, 18 June 2009, Santi Béjar wrote: > 2009/6/18 Jakub Narebski : [cut] > > > > $ git remote tracking > > > > would show all local branches that track , and have > > as default remote, > > Maybe my description is unclear, but it's not about local branches > which track on , it is about the local branch > representation of the remote branch, i.e. not 'master' but > origin/master (git remote tracking origin master in a default clone). Ah, the problem with the same (or similar) name for two different things. If we have local branch 'local' set to track branch 'master' on remote 'origin', we have: /------- local repository ------\ /- origin -\ / \ / \ | | | | 'local' --------> 'origin/master' -----------> 'master' refs/heads/local refs/remotes/origin/master refs/heads/master branch.local.remote = origin branch.local.merge = refs/heads/master remote.origin.fetch = +refs/heads/*:refs/remotes/origin/* 'origin/master' is called remote-TRACKING branch (for 'master' branch on remote 'origin'). Setting up automerge information for local branch 'local' which _follows_ branch 'master' on remote 'origin' is done using --TRACK option to git-branch. Therefore the confusion. Do I understand correctly that you want for $ git remote tracking origin master to return origin/master (and perhaps also origin/HEAD?). -- Jakub Narebski Poland