Search code examples
gitsvnversion-controlrevision

How to interpret --revision in svn2git


I'm using svn2git for some migration. Our SVN repo has around the 15000 revisions but only the last 2000 revisions are very important for our developers.

So I want to use the --revision to define the revisions:

$ svn2git ... --revision 13000:HEAD ..

Now is my question: How do I have to interpret the migration of this? Is everything before the revision 13000 also in my git but just without commits/tags/ or is this revision really the start and is all the data before this commit gone?


Solution

  • If you use svn2git <SVN URL> --revision 13000:HEAD --username name, it will migrate svn revision from revision 13000 to current revision. The revisions before 13000 is not exist in the migration git repo (including commits, tags, and branches). You can also check in .git/svn/refs/remotes/origin, you will find it only contains tags and branches from revision 13000 to current revision.

    If you want to keep branches and tags from svn to git, you can use --tags and --branches options.