Re: Where/how to create tracking branches?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 19, 2007, 19:43 UTC
- Message-ID
- <7vy7mu6ihj.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <17881.54325.475907.468492@lisa.zopyra.com>
Bill Lear <rael@zopyra.com> writes:
Show 10 quoted lines
> 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.
Show 6 quoted lines
> 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