Yeraze
Yeraze

Reputation: 3289

Best Way to import external repo's into Git

On my current project we're using a 3rd party library managed via SVN that I would like to add to our local github for internal management (tracking of the external updates across versions, as well as internal modifications to the library). In SVN, I've done this with svn import & "vendor branch" strategies.

I tried something similar in git: Create a repo, clone it local, svn export the library into the local clone, commit & push. All went fine except the push. The total repo is about 1.7G, due to large binary files (Graphics, Tarballs, and even some compiled DLL's/SO's/DYLIB's for various platforms). Yes, I know these files shouldn't be in a Repo but this developer felt otherwise and now I'm stuck dealing with it. I know binary files aren't git's strong suit (just like every other source control system), but there has to be a way to do it. Right now, the git-push just won't finish (it sucked up lots of CPU & network bandwidth for about 30 minutes, then sat idle for the next 10 hours).

How do I manage a vendor repo like this with Git?

Upvotes: 0

Views: 143

Answers (1)

vonbrand
vonbrand

Reputation: 11831

The best way to get a SVN repo is to use the git svn subcommands. First do a git svn clone (that can take a long time, as it has to ask SVN for every single full revision of the repo and construct a git repository locally), and keep it up to date with git svn rebase. There are severe restrictions on what you can do with such a repository, read the documentation carefully. For casual use it is fine, and given care one can even send patches upstream using git svn.

Upvotes: 1

Related Questions