1

I'm trying to convert a SVN repository to a GIT repository. Inside my SVN /trunk directory I have multiple directories:

/trunk
  /apps
  /site
  /services
  /scripts
/branches
  ...
/tags
  ...

If I run the command git svn clone --authors-file=authors.txt https://mysvnrepo.com.br/svn/myapp/ c:/mygitrepo it will create only one GIT repository with all directories within.

Basically what I want is to create a GIT repository for each directory inside /trunk so I would have 4 different GIT repos: apps, site, services and scripts.

Also I would like to create only GIT main branch, ignoring other SVN branches.

How can I do this with the git svn command?

Marcelo The Mage Coder
  • 1,944
  • 2
  • 11
  • 29
  • "*…one GIT repository with all directories within.*" Now split the repository in four: https://stackoverflow.com/a/17864475/7976758 – phd Nov 04 '21 at 13:37

1 Answers1

0

I would recommend first converting the SVN repository into one Git repository.

Then use git filter-repo on that Git repository in order to extract 4 repositories out of 4 subfolders in it.

git filter-repo --path apps
git filter-repo --path site
git filter-repo --path services
git filter-repo --path scripts

As illustrated here.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250