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

Re: Migrate an svn repo to git - Where did all the branches got? and tags?

From
Thomas Rast <trast@student.ethz.ch>
Date
May 21, 2010, 09:41 UTC
Message-ID
<201005211141.45664.trast@student.ethz.ch>
In-Reply-To
<CFE20E75-F23D-41EA-89AA-2FF59BFA5DF9@verizon.net>
Jack Moore wrote:
>    git svn clone --no-metadata -t tags -b branches -T trunk <repo-url>
[...]
>   git-repo/.git/refs/tags
> 
> is empty.
[...]
Show 5 quoted lines
> If I do a 
> 
> 	git branch -r
> 
> the branches and tags show up as remote branches.
That's how git-svn currently works.

To turn all remote branches into local branches you can use the following trick (don't do this in any repo other than a fresh git-svn clone unless you understand what it does!):

  git fetch . 'refs/remotes/*:refs/heads/*'

To further clean up history and turn svn tagging commits into real tags, you can refer, e.g., to the last section of

  http://kb.curseforge.com/repositories/convert-svn-to-git/
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Jack MooreNext: Jack Moore
Message 2 of 4 in “Migrate an svn repo to git - Where did all the branches got? and tags?”
  1. Jack MooreMay 21, 2010
  2. Thomas RastMay 21, 2010
  3. Jack MooreMay 21, 2010
  4. Ævar Arnfjörð BjarmasonMay 21, 2010

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.