我正在使用一个大型 svn 存储库(超过 30,000 个修订版)。
我使用 git-svn 的成功有限。
我的主要问题是 svn 存储库包含对大型二进制文件(~30MB)的频繁更新。我不关心这些文件的历史记录,但我确实关心这些文件的当前版本。
如果自上次 svn rebase 以来对大型二进制文件进行了多次更新(这很常见),那么 git svn rebase 运行速度会非常慢。我的 git 数据库也增长得很快。我正在寻求解决这两个关键问题。
理想情况下,我想做的是完全忽略 svn 中的这些大文件,然后运行一个仅获取最新版本的脚本,然后用 .gitignore 阻止该版本。不过,我对其他选择持非常开放的态度。
您可以使用以下命令忽略某些文件--ignore-paths
的选项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)"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)