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?
通过--no-minimize-url,EG,:
git svn clone <SVN_URL>/your/specific/folder --no-minimize-url --no-metadata folder
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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.