From: Junio C Hamano Date: Mon, 19 Feb 2007 19:43:36 GMT Subject: Re: Where/how to create tracking branches? Message-ID: <7vy7mu6ihj.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <17881.54325.475907.468492@lisa.zopyra.com> Bill Lear writes: > What is the recommended way to create tracking branches in my private > repo if I first create the corresponding topic branch in my private > repo and want to publish it via a public repo? > > Scenario: > > [my private repo] > % git checkout -b topic > [work, work, work, commit] > % git push /public/repo/project topic:topic So at this point the public shared repository has refs/heads/topic branch you and colleagues can work on together. So I am puzzled about this part... > Do I have to create the topic branch in my public repo first? This > seems crazy,... because you did do so and I do not think it is crazy. Maybe you meant "do I create tracking branch for 'topic' in public?", in which case the answer is no. > I tried this: > > % git pull /public/repo/project topic:origin/topic > > But it created a topic branch named "origin/topic" instead of a tracking > branch. Assuming your clone was initially made from /public/repo/project, doesn't "git fetch" without _any_ parameter work? $ git fetch