I have big svn repository cloned with git-svn
without any excluding/ignoring directories.
Now, I want to exclude one folder from cloned repo.
It is possible to add --ignore-paths
to existing git-svn repository? Need to rewrite history to increase free space and accelerate fetch
.
If you simply add it to your config now, the files you ignore in SVN will be frozen in their current states.
You can rewrite history with git filter-branch
to remove the ignored paths, but the revmap (the table maintained to map SVN revisions to git revisions) won't match up anymore. I think you can delete that and let it automatically re-generate, as long as you did not disable the SVN revision lines in the git commit comments.
If you later remove the ignore, you'll fail to git-svn fetch
because the diffs in SVN won't apply to the old files.
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.