How to Move a Repo from CVS to Git

To move a repo from CVS to Git (in Linux), one may follow these steps:
  • Create the repo in Git, say https://github.com/w3c/onespec;
  • Install cvsps, as easy as running: apt-get install cvsps;
  • Install git-cvs: apt-get install git-cvs;
  • Come back to a local directory, e.x. /tmp/.
    1. cd /tmp/
    2. git cvsimport -v -a -i -k -C onespec.git <target-cvs-module>. (This step might take a long time ...)
    3. cd onespec.git
    4. git checkout .
    5. git reset --hard
    6. git prune
    7. git remote add origin https://github.com/w3c/onespec
    8. git push origin --mirror
After this, you may want to push the files into gh-pages. Try:
  1. git checkout -b gh-pages
  2. git push origin gh-pages
  3. delete the master and origin branches
Acknowledge

This note came from a SysReq answer from @deniak.