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

Re: Git Clone Parameter

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 19, 2013, 15:05 UTC
Message-ID
<7vvc46y4il.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0=q62SmQwDPKjRv+Z8D59Uy=Kpanth8QFYFJ=xOA5JCtw@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 7 quoted lines
> Allan Acheampong wrote:
>> I could write a script with for each in but thats way too much hassle
>
>   $ git for-each-ref --format="%(refname)" refs/remotes/origin/ | sed
> 's/refs\/remotes\/origin\///;/HEAD\|master/d' | xargs git checkout -b
>
> (completely untested ofcourse)

You would at least need "xargs -n 1" for the produced command line to make any sense, and it is wasteful to actually check out each and every branch to the working tree only to create it.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 3 of 10 in “Git Clone Parameter”
  1. Allan AcheampongJul 19, 2013
  2. Ramkumar RamachandraJul 19, 2013
  3. Junio C HamanoJul 19, 2013
  4. Ramkumar RamachandraJul 19, 2013
  5. Johannes SixtJul 19, 2013
  6. Junio C HamanoJul 19, 2013
  7. Junio C HamanoJul 19, 2013
  8. Ramkumar RamachandraJul 19, 2013
  9. Philip OakleyJul 19, 2013
  10. Junio C HamanoJul 19, 2013

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.