8

I'm aware how to migrate a SVN repository which has the following structure

SVN Repo1
  + trunk
  + branches
  + tags

I could use the following command

git svn clone svn://hostname/Repo1/ --prefix=svn/ --no-metadata --authors-file "authors-transform.txt" --stdlayout c:\mytempdir

see https://learn.microsoft.com/en-us/azure/devops/repos/git/perform-migration-from-svn-to-git and https://stackoverflow.com/a/3972103/7556646.

But when my SVN repository has the following structure

SVN Repo2
  + Project1
      + trunk
      + branches
      + tags
  + Project2
      + trunk
          + Project1 <-- external to ^/Project1/trunk
      + branches
      + tags
  + Project3
      + trunk
          + Project1 <-- external to ^/Project1/trunk
      + branches
      + tags

I've no idea how to convert it to git.

Should I migrate each project in Repo2? In that case the svn externals are missing. Or is there a way to migrate the hole Repo2?

Remark: A SVN client user was just checking out Project2 or Project3 and not Project1.

3
  • see : stackoverflow.com/questions/571232/… Commented Dec 1, 2021 at 20:15
  • Did you suceeded ? I'm facing the same challenge atm Commented Aug 4 at 14:40
  • I'm still using Subversion. Commented Aug 5 at 9:04

1 Answer 1

1

As far as I know, there is no straightforward way of doing the equivalent of an SVN external in Git. One potential option could be to create a separate repository for Project1 and then use this repository as a submodule inside the Project2 and Project3 directories. This will mean that once code is changed in this new repository for project1 the submodules in both Project2 and Project3 can be easily updated.

Here is more info about Submodules

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.