With this Vagrant virtual environment, you can easily convert an existing CVS repository to a git repository.
Attention: For this you will need the CVS respository as a directory (contains .v files). Neither a repository over the network ("p-server") nor a working copy are sufficient.
- Install git and Vagrant on your machine
- Clone this repository into your project directory:
git clone https://github.com/geggo98/vagrant-cvs2git.git - Open a shell in the project directory
- Start Vagrant:
vagrant up - Wait until Vagrant has started and provisioned the virtual machine. This might take a while
- Vagrant has created a directory
cvsin the project directory. Copy your CVS respository in this directory. - Connect with the Vagrant virtual machine:
vagrant ssh - Inside the virtual machine, go to the directory "/vagrant":
cd /vagrant. Hint: The contents of this directory inside the machine are in sync with the project directory outside the machine - Adapt the script "convert-cvs-to-git.sh", e.g. with
vim convert-cvs-to-git.shinside the machine or with any editor outside the machine (Vagrant will sync the file automatically) - Start the migration inside the machine:
./convert-cvs-to-git.sh - Wait until the migration finishes. This will take some time.
- When the migration was successful, you will find a new git repository in the project directory
- Stop the virtual machine:
vagrant halt - If you don't need the machine any more, discard it and reclaim the used disk space:
vagrant destroy
There are several ways to do this, e.g. using git cvsimport or cvs2git. The base technology for git cvsimport is not well supported anymore. So here we use the most current development version of cvs2git.
When you start the Vagrant box for the first time, it installs all necessary pre-requisites and then fetches, compiles and installs the most current development version of cvs2git.