4

I have a large SVN repo (around 140GB) that holds many projects and does not follow the svn recommended directory structure. From all this data (it includes binaries, release builds and dependencies), all I really care about is at an specific path, that actually has a very small history compared to everything else.

All docs I've read so far on SVN-to-Git migration require me to pull the whole SVN repo to Git but this is taking forever, timeouting, going OOM and crashing. Is there any way I can pull only the history for this very specific folder?

Or is there a way I can export the SVN history for this folder alone into a new SVN repo and start the git migration from there?

2 Answers 2

3

Pass --no-minimize-url, E.G.,:

git svn clone <SVN_URL>/your/specific/folder --no-minimize-url --no-metadata folder
Sign up to request clarification or add additional context in comments.

Comments

0

If you have access to the Subversion repository (not just a working copy), I recommend using svn2git because it will be much faster.

Your rules file will resemble

create repository specific-folder.git
end repository

# note: trailing slash is important
match /trunk/foo/bar/baz/specific-folder/
  repository specific-folder.git
  branch master
end match

# ignore everything else
match /
end match

Then your command will be

svn-all-fast-export --identity-map=my-users --rules=specific-folder.rules \
  --stats --add-metadata /full/path/to/subversion/repo

Note that your new git repository will contain the contents of specific-folder.

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.