CVS import + repository merging to single git repo

Recording this process on the off-chance I need it again:

git init [reponame] cvs co [reponame] cd [reponame] find . -name "CVS" -exec rm -rf {} \; # (Remove CVS subdirs, bit ugly) git add .

Now in CVS repo, use cvs2git tools - follow advice from the excellent blog post by Oliver Gorwits - - make sure you update the project name in options files

cvs2git --options=cvs2git.options --fallback-encoding utf-8

Now back in the git repo

cat ~/CVS/cvs2svn-tmp/git-{blob,dump}.dat | git fast-import

There may or may not be some updated files to commit

git status

cd .. git clone --bare [reponame] [reponame].git

Now follow the answer from ColinM from or use subtree if you have git > 1.7.11