Below is my svn repository structure
svnrepo
- trunk
- branches
- tags
- folder1
- folder2
I want to have trunk
content, folder1
and folder2
in git repositories master
branch, how can I achieve this using subgit
migration?
gitrepo (master)
- trunk content
- folder1
- folder2
As I understand you don't want branches/ and tags/ in Git. In this case you can use the following configuration:
You can find more information about trunk/branches/tags/shelves options in branches mapping article. Optionally you can add
shelves=shelves/*:refs/shelves/*
option if you need bi-directional translation and want to translate every single Git commit to a separate revision in case of self-merges in branches.Update: the question was about translating trunk and a couple of branches into the same Git branch. I can only propose the following approach:
It will translate the project root into refs/heads/master but skip everything except these 3 directories. Note that not skipped directories will still be downloaded from SVN but discarded locally later.
This this is the closest solution to your original question, I don't know anything better.