May 8, 2014

I needed to convert a CVS repository into a GIT repository. This can be done using cvs2git, given file level access to the CVS repository.

The following process worked for me. I downloaded the latest version (2.4) from

I then built and installed it using:

$ cd cvs2svn-trunk
$ make man
$ make install

This was version 2.4.0:

$ cvs2git --version
cvs2git version 2.4.0

The following command took a few hours on my 5Gb repository:

$ cvs2git --blobfile=cvs2git/git-blob.dat --dumpfile=cvs2git/git-dump.dat DCSLIVE --username=cvs2git --encoding latin_1

DCSLIVE was the directory containing the CVS repository.

The --encoding option was added after an initial run failed to parse all the commit comments correctly.

Once this is done, you'll have two files git-blob.dat and git-dump.dat. These can be imported into a new repository:

$ git init --bare repos/dcslive.git
Initialized empty Git repository in /apps/repos/dcslive.git/
$ git fast-import --export-marks=../cvs2git-tmp/git-marks.dat <../cvs2git-tmp/git-blob.dat
$ git fast-import --import-marks=../cvs2git-tmp/git-marks.dat <../cvs2git-tmp/git-dump.dat


Tags: cvs git cvs2git