git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yubin Ruan <ablacktshirt@gmail.com>
To: git@vger.kernel.org
Subject: [RFC] git clone add option to track all remote branches
Date: Mon, 2 Apr 2018 09:50:35 +0800	[thread overview]
Message-ID: <20180402015035.mzgye6apwn3igch5@HP> (raw)

Hi,

I am writing to ask that whether or not you think will be appropriate to add
an option to "git clone" so that whenever a repo is cloned, branches are
created automatically to track corresponding remote branches. (or is there any
equivelant option?)

You can obviously do this by a bash command like this

    git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done

but it will be better if we can have an option in "git clone".

Regards,
Yubin

             reply	other threads:[~2018-04-02  1:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02  1:50 Yubin Ruan [this message]
2018-04-02  2:56 ` [RFC] git clone add option to track all remote branches Junio C Hamano
2018-04-02  3:21   ` Junio C Hamano
2018-04-02  3:45     ` Randall S. Becker
2018-04-02  9:29 ` Ævar Arnfjörð Bjarmason

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=20180402015035.mzgye6apwn3igch5@HP \
    --to=ablacktshirt@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).