We have a huge SVN repository (~100GB) that we are trying to migrate to Git. Problem is that, the repo contains lots of binary files spread across the folder tree.
First thing that we thought is to move the binaries to Git-LFS, but there's some questions that we need to address before:
Thanks
The high-level workflow for migrating from SVN to Git is as follows: Prepare a migration environment. Convert the source SVN repository to a local Git repository. (Optional) Synchronize the local Git repository with any changes from SVN repository while developers continue using SVN.
Migrate from SVN to Git with History and Branches txt file to match the syntax you need for your Git author information. Now that you have your list of authors ready, you can run the import using git svn and specify the authors-transform. txt . Copy the authors-transform.
I think I've found the answer for this, though haven't completed testing it myself (the first step takes many hours for our repository). The trick is from this Atlassian documentation:
https://confluence.atlassian.com/bitbucket/use-bfg-to-migrate-a-repo-to-git-lfs-834233484.html
This is specific to bitbucket, but I imagine it would work with any git repository.
Step 1: First step is to convert the SVN project to git. This can be done with git-svn
as described here:
https://john.albin.net/git/convert-subversion-to-git
That page also described ways to carry over the authors and add in the extra details allowed in git authors (real name and email).
Step 2: Now follow the instructions in the above Atlassian documentation to use the "BFG Repo-Cleaner" replace all "big files" in your history with references to git LFS. This is a simpler tool to do some of the things that can also be done with the git-filter-branch
tool.
I could give step-by-step instructions here, but I'd just be copying from those other sources, and I haven't actually tried it myself yet (running now). I'll update again when I've seen the results here.
EDIT: I forgot to update this when I'd finished testing almost two years ago, and just noticed now because I got an upvote. From what I remember, I ended using git lfs migrate
instead of BFG to migrate large files out of the repo and into git LFS. (https://github.com/git-lfs/git-lfs/wiki/Tutorial)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With