Re: Where/how to create tracking branches?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill Lear <rael@xxxxxxxxxx> 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





-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]