简体   繁体   中英

git-svn mirror without binaries

We are in the process of converting/mirroring an svn repo to git. However, we DONT want to bring in all the binaries (jars in this case) that have been checked into svn into our new git repo. Removing those binaries is easy enough of course but they are still part of svn history (which we really don't care about at the moment). Any ideas? Here is the high-level flow:

1.) git svn rebase

2.) find . -name "*.jar" -type f | xargs rm -rf

3.) git add .

4.) git commit -am "mirror op"

5.) git push --force

If you are brave enough, you can think about and try pure Git-way and use --ignore-paths=<regex> on starting init or clone when preparing Git-mirror - in order to ignore unwanted files automatically.

Perl-style regexp for ignoring all *.jar in tree is a toy-task even for junior

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM