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

Re: [PATCH v2] git-clone: Add option --branch to override initial branch

From
PCPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Date
Mar 11, 2009, 08:52 UTC
Message-ID
<4d8e3fd30903110152m1b52de30ge630d6b9f6a4c7fe@mail.gmail.com>
In-Reply-To
<94a0d4530903090901o6e8c2a40k676387f90ee461b3@mail.gmail.com>
[restored the CC list]

On Mon, Mar 9, 2009 at 5:01 PM, Felipe Contreras <felipe.contreras@gmail.com> wrote:

> On Mon, Mar 9, 2009 at 4:39 PM, Paolo Ciarrocchi
> <paolo.ciarrocchi@gmail.com> wrote:
[...]
Show 12 quoted lines
>> I wrote a comment about the --branch approach a couple of days ago, dunno why
>> but this thread never reached my inbox (replying via gmame web interface).
>>
>> http://thread.gmane.org/gmane.comp.version-control.git/112527
>>
>> As I wrote in my post a friend of mine, new to git, was looking for the
>> possibility of cloning a repo and automatically checkout a specific branch.
>
> Yeah, I also would like this option... one-liner for people that don't
> know git at all.
>
> me: you want my code? just run this command.
Yes, that is what my friend was lookin for.

I told him to use the following procedure: $ git clone -n URL $ git checkout -b foo origin/bar

He is now an almost happy git user :-).

That being said, I see the following command as an improvement over the actual GIT UI:

 $ git clone git://URI -b bar
Ciao,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/
http://mypage.vodafone.it/
Previous: Felipe ContrerasNext: Miles Bader
Message 16 of 19 in “git-clone: Add option --branch to override initial branch”
  1. git-clone: Add option --branch to override initial branchTor Arne Vestbø, Mar 2, 2009
  2. Johannes SchindelinMar 2, 2009
  3. Junio C HamanoMar 3, 2009
  4. Tor Arne VestbøMar 3, 2009
  5. git-clone: Add option --branch to override initial branchTor Arne Vestbø, Mar 3, 2009
  6. Johannes SchindelinMar 3, 2009
  7. Tor Arne VestbøMar 3, 2009
  8. Junio C HamanoMar 3, 2009
  9. Tor Arne VestbøMar 3, 2009
  10. Junio C HamanoMar 3, 2009
  11. Junio C HamanoMar 4, 2009
  12. Johannes SchindelinMar 4, 2009
  13. Tor Arne VestbøMar 4, 2009
  14. Paolo CiarrocchiMar 9, 2009
  15. Felipe ContrerasMar 9, 2009
  16. Paolo CiarrocchiMar 11, 2009
  17. Miles BaderMar 12, 2009
  18. Paolo CiarrocchiMar 12, 2009
  19. Felipe ContrerasMar 12, 2009

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.