Beto
Beto

Reputation: 579

How to convert only one project from an svn repository to git?

I'm trying to convert a svn repository to git, but the repository has 3 projects and I only want one (which has tags and trunk), the tree below shows the repository.

project
├── tags
│   ├── v1_project1
│   └── v1_project2
└── trunk
    ├── project1
    ├── project2
    └── project3

I want to convert only project1 (project1, v1_project1). Does anyone know how I can do this?

EDITED

I tried converting using svn2git from that link: https://github.com/nirvdrum/svn2git

But I did not understand what it means --no-minimize-url:

  svn2git http://svn.example.com/path/to/repo/nested_project --no-minimize-url

Upvotes: 1

Views: 176

Answers (2)

eftshift0
eftshift0

Reputation: 30242

So, no branches other than the trunk. With git-svn you can specifically specify the directory where the tags or branches are... of course, it's not standard layout so you won't use -s. You will use something like -t project/tags/*_project1 -T project/trunk/project1. You can specify multiple of each if necessary.

Upvotes: 0

VonC
VonC

Reputation: 1325397

You would typically use subgit.com (which has a free option, handy for a one time export/import).

It can accommodate unconventional trunk/branch/tag mapping.

Upvotes: 1

Related Questions