I'm working with a large svn repository (30,000+ revisions). I am using git-svn with limited success.
My major problem is that the svn repository contains frequent updates to large binary files (~30MB). I do not care about the history of these files but I do care about the current versions of these files.
git svn rebase runs very slowly if there have been multiple updates to the large binary files since my last svn rebase (which is common). My git database also grows very quickly. I'm looking to resolve these two key issues.
Ideally, what I would like to do is completely ignore these large files from svn and then run a script that fetches only the latest version which I would then block with my .gitignore. I'm very open to other options though.
you can ignore some files using the --ignore-paths
option of git svn
:
--ignore-paths=<regex>
This allows one to specify a Perl regular expression that will
cause skipping of all matching paths from checkout from SVN.
The --ignore-paths option should match for every fetch
(including automatic fetches due to clone, dcommit, rebase,
etc) on a given repository.
config key: svn-remote.<name>.ignore-paths
If the ignore-paths config key is set and the command line
option is also given, both regular expressions will be used.
Examples:
Skip "doc*" directory for every fetch
--ignore-paths="^doc"
Skip "branches" and "tags" of first level directories
--ignore-paths="^[^/]+/(?:branches|tags)"
git svn option --ignore-paths=
is useful to exclude unwanted binary files when converting svn repository to git
If you know the filename extensions of the binary files then you can write a regex expression to exclude them, FOR EXAMPLE,
.jar files:--ignore-paths=".*.jar$"
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