Let's take a look at converting data using cvs2git:
- The first step is to migrate the CVS data structure to something that could be imported with git fast-import:
$ ./cvs2git --blobfile=/tmp/git-blob.dat
--dumpfile=/tmp/git-dump.dat "--username=Firstname Lastname" ~/cvsroot
Writing temporary files to '/var/folders/sf/rdjwj43j4kx63xxng1gkgd040000gn/T/cvs2git-ElawtZ
...
- The first pass (CollectRevsPass) went through all the version files and analyzed them for revisions. The next 14 passes will transform all kinds of data from CVS and convert it:
----- pass 2 (CleanMetadataPass) -----
Converting metadata to UTF8...
Done
...
- Now the tool is will display statistics about the import:
cvs2svn Statistics:
------------------
Total CVS Files: 50
Total CVS Revisions: 50
Total CVS Branches: 0
.....
- The next step is to create a skeleton Git repository, where we could import the converted data:
$ mkdir itwasmyparty
$ cd itwasmyparty/
$ git init
Initialized empty Git repository in /Users/joostevertse/git/itwasmyparty/.git/
- Then, we start the import, with the blobs being imported first (git-blob.dat):
$ git fast-import --export-marks=/tmp/git-marks.dat < /tmp/git-blob.dat
Unpacking objects: 100% (48/48), done.
git-fast-import statistics:
....
- Then, we import the Git metadata (git-dump.dat):
$ git fast-import --import-marks=/tmp/git-marks.dat < /tmp/git-dump.dat
Unpacking objects: 100% (23/23), done.
git-fast-import statistics:
....
- Now, all we need to do is checkout the data:
$ git checkout
$ git status
On branch master
nothing to commit, working tree clean
Now you have a migrated CVS repository.