cvs to git

陶锋
2023-12-01

Refer to 

cvs2git Documentation

Tool

https://repo.or.cz/cvs2svn.git

Example:

First dump all CVS from server side:

Refer to sourceforge readme.

Example

rsync -ai a.cvs.sourceforge.net::cvsroot/tinyhttpd/ /my/local/dest/dir/

1. Dump with cvs2svn tool above

cvs2git \
    --blobfile=cvs2svn-tmp/git-blob.dat \
    --dumpfile=cvs2svn-tmp/git-dump.dat \ 
    /path/to/cvs_server_v_file_folder

2.  Import to git

  1. mkdir myproject.git
    cd myproject.git
    git init --bare
  2. Load the dump files into the new git repository using git fast-import:

    git fast-import --export-marks=../cvs2svn-tmp/git-marks.dat < ../cvs2svn-tmp/git-blob.dat
    git fast-import --import-marks=../cvs2svn-tmp/git-marks.dat < ../cvs2svn-tmp/git-dump.dat

    On Linux/Unix this can be shortened to:

    cat ../cvs2svn-tmp/git-blob.dat ../cvs2svn-tmp/git-dump.dat | git fast-import
 类似资料:

相关阅读

相关文章

相关问答