Migrating a CVS repository to GIT

    Importing from a CVS repository can be done using git-cvsimport either by direct access to the remote CVS server or from a snapshot tarball. The procedure includes the following steps:

    1. Import a CVS repository to a git repository (ususally on a local machine)
    2. Create a bare clone of the latter to be used as a shared read/write repository (again locally)
    3. Set a new repository on the server through gitosis (see above "Starting a new project repository)
    4. Push the cloned one in 2. to the newly created one in 3.

    All steps above should be done on a local machine. Access to the repositories on the server is done only through gitosis.

    1. Direct import from a server

    joe@local# cvs -z3 -d login
    joe@local# git-cvsimport -v -a -i -k -d -C gromacs-cvs.git gmx

    This way is very slow, and it is much faster to use a tarball of a CVS snapshot.

    1. (Alternative) Import from a CVS snapshot tarball cd /home/gmx tar cvfz /home/rossen/gromacs-cvs-20090218.tar.gz cvs
    rossen@local# pwd
    rossen@local# scp .
    rossen@local# tar xvfz gromacs-cvs-20090218.tar.gz
    rossen@local# git-cvsimport -a -i -k -d /home/rossen/temp/cvs -C gromacs-cvs.git gmx

    2. Create a bare clone of the imported GIT

    rossen@local# mkdir gromacs
    rossen@local# cd gromacs
    rossen@local# git --bare init --shared
    rossen@local# git --bare fetch ../gromacs-cvs.git master:master
    rossen@local# git remote add gromacs

    3. Set a new repository on the server through gitosis

    See above " Starting a new project repository". The name of the new one is gromacs.

    4. Push the clone to the server

    rossen@local# git push gromacs --mirror


    Page last modified 23:57, 8 Jul 2009 by rossen