Jelle De Loecker
Jelle De Loecker

Reputation: 21955

Unable to convert svn repository (without trunk) to git

I'm trying to convert my svn repo to git, but I'm not having much success. The repository in question does not have anything like a "trunk". The layout is the following:

/home/svn/
      |--- /project1/
      |--- /project2/
      |--- /repos/project3/

And underneath those project folders are the files. No trunk, no branches, no nothing special. At the time that was all I needed, and now it's biting me in the ass.

I'm following this guide: http://john.albin.net/git/convert-subversion-to-git

When I run this command:

git svn clone svn+ssh://[email protected]/home/svn/repos/kiflea --no-metadata -A authors-transform.txt --stdlayout ~/kiflea

It says it has created an empty git repository... But I don't really want it to be empty.

I also have no idea what the following commands should look like, since my repository has a different layout.

Commands like git symbolic-ref HEAD refs/heads/trunk or git config remote.bare.push 'refs/remotes/*:refs/heads/*'

Upvotes: 30

Views: 9690

Answers (1)

Dmitry Pavlenko
Dmitry Pavlenko

Reputation: 8968

Just remove --stdlayout option. It means trunk/branches/tags structure.

Upvotes: 57

Related Questions