From: Junio C Hamano <junkio@cox.net>
To: "Alexander Litvinov" <litvinov2004@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Getting new branches from remote repo.
Date: Sun, 12 Nov 2006 20:49:33 -0800 [thread overview]
Message-ID: <7v8xigar36.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <6e1787fe0611122033p49671e13xf5b7f95beeba8b06@mail.gmail.com> (Alexander Litvinov's message of "Mon, 13 Nov 2006 10:33:52 +0600")
"Alexander Litvinov" <litvinov2004@gmail.com> writes:
> I have a trouble I don't know how to solve. When I am cloning remote
> repo I automatically get all it's branches stored at my repo (they are
> listed at .git/remotes/origin). When someone adds new branch(es) to
> remote repo git pull (git fetch) does not automatically add them to my
> repo. I have a tool to list all remote branches (git ls-remote --heads
> origin) but I can't find how to add interesting (or all) branches to
> by repo.
After finding out $that_new_branch's name, add either
Pull: refs/heads/$that_new_branch:refs/heads/$that_new_branch
or if you are in "separate remote" school, then perhaps
Pull: refs/heads/$that_new_branch:refs/remotes/origin/$that_new_branch
to .git/remotes/origin and running git fetch would give you what
you want, I think.
> By the way, how can I clone remote repo created by cloning another
> repo using git clone --use-separate-remotes ? Even git ls-remote
> --heads origin does not show all branches taken from that another
> repo.
Well, the point of "separate remote" is not to pollute local
heads/ namespace with refs that merely track remote repository,
so if you say "ls-remote --heads" you would not see them. They
are not "heads" in that repository.
You would still see them if you say "ls-remote" without --heads.
next prev parent reply other threads:[~2006-11-13 4:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 4:33 Getting new branches from remote repo Alexander Litvinov
2006-11-13 4:49 ` Junio C Hamano [this message]
2006-11-13 5:29 ` Alexander Litvinov
2006-11-13 9:17 ` Karl Hasselström
2006-11-13 16:57 ` Matthias Hopf
2006-11-13 17:44 ` Shawn Pearce
2006-11-13 17:53 ` Karl Hasselström
2006-11-13 18:17 ` Junio C Hamano
2006-11-13 18:40 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v8xigar36.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=litvinov2004@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.