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

Re: RFC for 1.7: Do not checkout -b master origin/master on clone

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Aug 17, 2009, 17:45 UTC
Message-ID
<vpqhbw6pc66.fsf@bauges.imag.fr>
In-Reply-To
<4A818B90.9050206@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> - git clone does not set up any local branches at all
> - git svn fetch does not set up any local branches at all
If you don't set up a local branch, it means either
- You start with a detached HEAD, or
- You start with no working tree at all.

In both cases, you introduce more trouble for the beginner, just more notions to learn before being able to do the very first step.

And you also break a good property of Git: in Git, you can use the "one repo per branch" or the "multiple branches in a repository" the way you want.

Personnally, I rarely have more than one branch for me (but I appreciate very much having one branch per developer). And this way, I can just forget that Git has multiple branches in a repo. When I want to work on a project, I clone it, I hack, I commit, and then I send the result (git push, git svn dcommit, git send-email, depending on the project). In this workflow, I almost never have to use "git branch", "git checkout", "git merge", it works, and Git does the right thing for me.

-- 
Matthieu
Previous: Eric Wong
Message 5 of 5 in “RFC for 1.7: Do not checkout -b master origin/master on clone”
  1. Michael J GruberAug 11, 2009
  2. Santi BéjarAug 11, 2009
  3. Junio C HamanoAug 12, 2009
  4. Eric WongAug 12, 2009
  5. Matthieu MoyAug 17, 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.