git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC] git clone add option to track all remote branches

From
YRYubin Ruan <ablacktshirt@gmail.com>
Date
Apr 2, 2018, 01:50 UTC
Message-ID
<20180402015035.mzgye6apwn3igch5@HP>
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

Next: Junio C Hamano
Message 1 of 5 in “[RFC] git clone add option to track all remote branches”
  1. Yubin RuanApr 2, 2018
  2. Junio C HamanoApr 2, 2018
  3. Junio C HamanoApr 2, 2018
  4. Randall S. BeckerApr 2, 2018
  5. Ævar Arnfjörð BjarmasonApr 2, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.