Import SVN trunk Into Subfolder

I’d like to import an existing SVN repository but would like to import the folder “trunk” in the sub directory “src” and not in the root directory of the git repository. I guess somehow in the “Branches Mapping”? But I could not figure out. How can I do that?

Hello

The directory cannot be renamed during the import, but the trunk directory can be translated as a directory. If you use the following configuration:

url = <SVN project root URL>

trunk = :refs/heads/master

then all the content of the repository root, including trunk directory, will appear in Git ‘master’ branch as directories. If you need only trunk, then you can exclude other directories by excludePath directive:

url = <SVN project root URL>

trunk = :refs/heads/master
excludePath = /<unneeded directory in root>
excludePath = /<another unneeded directory in root>

In that case, the ‘master’ branch will contain only unexcluded directories.

Hope it will help.

So I can’t do:

svn:trunk\bla.txt -> git:\src\bla.txt ?

yes, it won’t work.

Thank you.