10.6 Importing from CVS

If you’re coming to Git from CVS, there are some hurdles you must jump over compared to Subversion. In fact, the most reliable method for converting a CVS repository to Git is to convert it to a Subversion repository first using the cvs2svn command.[31] cvs2svn is a tool for converting a CVS repository to a Subversion repository.

Git ships with a tool for importing CVS repositories called git cvsimport. But since the cvs2svn command is much more stable to a Git repository, we’ll focus on it.

To start with, you need to get revision control system (RCS) files from your CVS repository. Once you have those, you need to convert them to an SVN dump file using the cvs2svn tool:

 
​prompt> cd /path/to/cvs-rcs-files ...

Get Pragmatic Version Control Using Git now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.