6

I would like to import a SVN repository into a GitHub Enterprise repository

There are many questions related to this matter and most of them can be addressed either with Git submodules or Git subtree.

In my case I have two repositories:

  • The main project repository
  • The modules repository (a big SVN repository over 2 GB)

This module repository has the following architecture:

foolib/
   moduleA/
      ...
   moduleB/
      ...
   ...

For the project, only few modules from foolib are used as svn:externals. For example this main project only uses moduleA from foolib.

As mentioned in this question one possible solution is to use sparse-checkout. I'm guessing Git subtree would also do the trick. Unfortunately it doesn't solve the main issue.

If my project is very small, as long as I get something from foolib, even with sparce-checkout, I will retrieve the whole history of foolib (e.g. 2 GB). This issue doesn't exist with SVN because an svn:externals property only fetches what it needs, not the whole history.

I can imagine to do foolish things like recreating a local sparse repository dynamically using the commits listed in git log --follow foolib/moduleA. But I assume this is not a good solution.

What would be the correct workflow to get a similar behavior in Git without having to fetch the whole history of foolib everything I need only few modules?

6
  • "one possible solution": to which problem? Where is your git repo? Or are you using git-svn? I am still confused. Commented Aug 3, 2017 at 6:46
  • @VonC, I've edited my question. The main issue there is with submodules, sparse-checkout or subtree I will always get the whole history of foolib which is huge. I would like to avoid this somehow. Commented Aug 3, 2017 at 8:33
  • @VonC Any news? Commented Aug 16, 2017 at 8:15
  • Could you consider help.github.com/articles/… in order to isolate each module in its own repo? (once foolib has been imported from SVN into one giant Git repo) Commented Aug 16, 2017 at 8:17
  • This can help splitting the giant Git repo into smaller ones Commented Aug 16, 2017 at 8:19

0

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.