I intend to switch over from CVS to Git.
In the case of SVN, there seems to be cvs2svn. Is there a similar tool to easily migrate from CVS to Git?
In addition to provided answers, here's a guide on how to convert cvs to git using cvs2git tool. Here, modulename is a name of CVS directory you want to import.
Prerequisites
cvs2svn package (which includes cvs2git command) should be already installed.
Update: steps 1 and 2 are not fully correct - before attempting, read the comment below by mhagger, the maintainer of cvs2git
checkout modulename
cvs -d URL co -P modulename
create an empty CVSROOT needed by cvs2git
mkdir modulename/CVSROOT
download an example of cvs2git.options at http://cvs2svn.tigris.org/svn/cvs2svn/trunk/cvs2git-example.options (user "guest" with no password)
edit cvs2git.options file. Replace r'test-data/main-cvsrepos' with 'modulename'. Edit authors transforms.
# edit this
run_options.set_project( r'modulename',
# and this
author_transforms={
'jrandom' : ('J. Random', 'jrandom@example.com'),
'mhagger' : 'Michael Haggerty ',
run cvs2git to create git temp files
cvs2git --options=cvs2git.options --fallback-encoding utf-8
create git repository
mkdir gitrepo && cd gitrepo && git init .
import from git temp files created by cvs2git
cat ../cvs2git-tmp/git-{blob,dump}.dat | git fast-import
checkout working copy
git reset --hard