Where/how to create tracking branches?

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

 



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

[somebody else:]
% git clone /public/repo/project
% git checkout -b topic origin/topic
[work, work, work, commit]
% git push /public/repo/project topic:topic

[my private repo]
% git checkout topic
% git pull /public/repo/project topic
remote: Generating pack...
remote: Done counting 5 objects.
Result has 3 objects.
remote: Deltifying 3 objects.
remote: /3) done/3) done
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking 3 objects
 100% (3/3) done
Updating 4751fcc..2d92737
Fast forward
 A |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
% git branch
  master
* topic
% git branch -r
  origin/HEAD
  origin/master

Now, I'm on my private repo, but I really want a tracking branch for
doing pulls from my public repo, or peers, for this topic branch.

Do I have to create the topic branch in my public repo first?  This
seems crazy, as our company repo is just another "global" public repo
and each developer would need to create branches there instead of on
their own machine.

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.


Bill
-
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]