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

Git Clone Parameter

From
AAAllan Acheampong <allanadjei@gmail.com>
Date
Jul 19, 2013, 09:21 UTC
Message-ID
<FB572366-0B1D-4053-9255-979CB213B160@gmail.com>
Hi,
it would be nice to have a parameter on 'git clone' that not only clones the repo, but also creates local branches for ALL the branches that are in the repo. I'm new to git, but I found it very confusing to understand the difference between "remote" , "remotes". Is it in the cloned repo, or is it in  a remote place? If its local, why doesn't it get shown when I do 'git branch' but when I do 'git branch -a'. For example, I create a project locally with multiple branches, push it, delete it locally and clone it back to my machine. On a 'git branch' I would only see the head branch. I understand that there are projects that have a lot of branches that are not needed for that specific developer, but still it would be nice if one could specify this at clone time. Something like 'git clone <theR
 epo> -createLocalBranchesForAllBranches' . Of course the param shouldn't be that long. I could write a script with for each in but thats way too much hassle and effort for something that should be there already and I don't think I am the first to get confused by this.

I'd like to know your opinions about that and what you think about the suggestion. Allan.

Next: Ramkumar Ramachandra
Message 1 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.