git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC] git clone add option to track all remote branches
@ 2018-04-02  1:50 Yubin Ruan
  2018-04-02  2:56 ` Junio C Hamano
  2018-04-02  9:29 ` Ævar Arnfjörð Bjarmason
  0 siblings, 2 replies; 5+ messages in thread
From: Yubin Ruan @ 2018-04-02  1:50 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-02  9:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-02  1:50 [RFC] git clone add option to track all remote branches Yubin Ruan
2018-04-02  2:56 ` 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

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).