All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Gilger <heipei@hackvalue.de>
To: git@vger.kernel.org
Subject: Re: how to clone all branches include remote branches
Date: Tue, 10 Feb 2009 18:05:42 +0000 (UTC)	[thread overview]
Message-ID: <gmsflm$sd4$1@ger.gmane.org> (raw)
In-Reply-To: 95463c700902100949w23a95536re9a65a2e5c3c0b5d@mail.gmail.com

On 2009-02-10, gnu kevin <kevin.gnu.zhang@gmail.com> wrote:
> I'd like to know how to get all remote(grandparent) branches by clone
> a remote repo . for example:
> remote repo ABC contains below branches:
> master
> stable/main
> dev/main

You could (if your .git/config) already contains the remote simply add a 
line:
fetch = +refs/remotes/*:refs/remotes/<remote-name>/remotes/*

The double remotes is used so that no remote-remote-branch can overwrite 
your tracking branch with the same name.

Hope that helped,
Jojo

-- 
Johannes Gilger <heipei@hackvalue.de>
http://hackvalue.de/heipei/
GPG-Key: 0x42F6DE81
GPG-Fingerprint: BB49 F967 775E BB52 3A81  882C 58EE B178 42F6 DE81

      reply	other threads:[~2009-02-10 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 17:49 how to clone all branches include remote branches gnu kevin
2009-02-10 18:05 ` Johannes Gilger [this message]

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='gmsflm$sd4$1@ger.gmane.org' \
    --to=heipei@hackvalue.de \
    --cc=git@vger.kernel.org \
    /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.