{"thread":{"id":"23862","subject":"Migrate an svn repo to git - Where did all the branches got? and tags?","startedAt":"2010-05-21T04:20:18Z","lastAt":"2010-05-21T16:11:28Z","messageCount":4,"participants":["Jack Moore","Thomas Rast","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"142005","messageId":"CFE20E75-F23D-41EA-89AA-2FF59BFA5DF9@verizon.net","threadId":"23862","inReplyTo":null,"subject":"Migrate an svn repo to git - Where did all the branches got? and tags?","fromName":"Jack Moore","fromEmail":"jhmoore719@verizon.net","sentAt":"2010-05-21T04:20:18Z","receivedAt":"2010-05-21T04:20:18Z","isPatch":false,"sender":{"key":"jhmoore719@verizon.net","avatar":null},"body":"All,\n\nI have a subversion repository with the usual structure\n\nsvn-repo\n  |\n  +-branches\n      +-release1\n      +-release2\n  +-tags\n      +-r1dev\n      +-r1test\n      +-r2dev\n      +-r2test\n  +-trunk\n\nthat I want to migrate to git.\n\nI cloned the svn repo with\n\n   git svn clone --no-metadata -t tags -b branches -T trunk <repo-url>\n\nI used the example in the Pro Git book.\n\nthe cloned repo has files \n\n  git-repo/.git/refs/heads/master\n  git-repo/.git/refs/remotes/trunk\n\ndirectory\n\n  git-repo/.git/refs/tags\n\nis empty.\n\nDirectories git-repo/.git/logs/... have files corresponding to the branches and tags, but they do not appear to reference git objects.\n\nThere are unhandled.log.gz files in the .git/svn directory for each branch and tag.\n\nIf I do a \n\n\tgit branch -r\n\nthe branches and tags show up as remote branches.\ngitk appears to show all of the commits, but I do not see any of the branches and tags.\n\nI would like to make the branches and tags to appear al local to git repo.\n\nIs there a way to do this?\n"},{"id":"142017","messageId":"201005211141.45664.trast@student.ethz.ch","threadId":"23862","inReplyTo":"CFE20E75-F23D-41EA-89AA-2FF59BFA5DF9@verizon.net","subject":"Re: Migrate an svn repo to git - Where did all the branches got? and tags?","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-05-21T09:41:45Z","receivedAt":"2010-05-21T09:41:45Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Jack Moore wrote:\n>    git svn clone --no-metadata -t tags -b branches -T trunk <repo-url>\n[...]\n>   git-repo/.git/refs/tags\n> \n> is empty.\n[...]\n> If I do a \n> \n> \tgit branch -r\n> \n> the branches and tags show up as remote branches.\n\nThat's how git-svn currently works.\n\nTo turn all remote branches into local branches you can use the\nfollowing trick (don't do this in any repo other than a fresh git-svn\nclone unless you understand what it does!):\n\n  git fetch . 'refs/remotes/*:refs/heads/*'\n\nTo further clean up history and turn svn tagging commits into real\ntags, you can refer, e.g., to the last section of\n\n  http://kb.curseforge.com/repositories/convert-svn-to-git/\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"142029","messageId":"6E5E7194-CDE0-4D39-BD36-B837030C261B@verizon.net","threadId":"23862","inReplyTo":"201005211141.45664.trast@student.ethz.ch","subject":"Re: Migrate an svn repo to git - Where did all the branches got? and tags?","fromName":"Jack Moore","fromEmail":"jhmoore719@verizon.net","sentAt":"2010-05-21T13:57:02Z","receivedAt":"2010-05-21T13:57:02Z","isPatch":false,"sender":{"key":"jhmoore719@verizon.net","avatar":null},"body":"Thx, Thomas\n"},{"id":"142052","messageId":"AANLkTinE8TyUB43ZACRXo8U0ghgnQ9cbBOkcl0zBJlWm@mail.gmail.com","threadId":"23862","inReplyTo":"6E5E7194-CDE0-4D39-BD36-B837030C261B@verizon.net","subject":"Re: Migrate an svn repo to git - Where did all the branches got? and tags?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-05-21T16:11:28Z","receivedAt":"2010-05-21T16:11:28Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Fri, May 21, 2010 at 13:57, Jack Moore <jhmoore719@verizon.net> wrote:\n> Thx, Thomas\n\nIf your history isn't too crazy you might want to try converting with\nsnerp-vortex instead of git-svn.\n\nIt isn't always better (or indeed, often), but might be in your case.\n"}]}