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

How to fetch all remote branches from remote?

From
Sskillzero@gmail.com <skillzero@gmail.com>
Date
Aug 3, 2009, 22:20 UTC
Message-ID
<2729632a0908031520n71514fffne0667c6b229f836f@mail.gmail.com>

Is there a way to fetch all the remote branches of a remote? I have one computer that cloned a repository from a server and I want clone that computer's repository to another computer, but it only brings over the local branches from the clone. I'd like to also get all the remote branches so it's the same as if I had cloned directly from the server. Just as if I had cp -R'd the .git folder (except with the remote tracking info I get when I clone). The source computer's repository is using git-svn so I'm trying to make a copy of that repository in a way that I can just push and pull changes to the intermediate git svn repository then later do the final git svn dcommit.

Is the best way to just copy the whole .git folder to the destination computer and then add the original as a remote? That's a last resort for me because as new svn branches are created, I'd like to pick them up when I do git pull's from the second computer.

Next: Peter Harris
Message 1 of 2 in “How to fetch all remote branches from remote?”
  1. skillzero@gmail.comAug 3, 2009
  2. Peter HarrisAug 4, 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.