Migration tool for the historical.
git cvsimport pulls a CVS repository's history into a new Git repo, commit by commit. It is the canonical first step when escaping CVS.
Think of it as a tape player: it reads CVS RCS files (often via cvsps to group them into commits) and replays them as Git commits with the original metadata.
git cvsimport [-v] [-d <CVSROOT>] [-C <git-repo>] [-r <remote>]
[-A <authors-file>] [-k] [-s <subst>] [-i]
[-p <opts-for-cvsps>] [<CVS_module>]
Requires cvsps installed and reachable. Run from an empty target
directory or pass -C to name one.| Flag | What it does |
|---|---|
-v | Verbose; show every patchset as it is imported |
-d <CVSROOT> | CVSROOT spec, e.g. :pserver:user@127.0.0.1:/srv/cvs |
-A <authors-file> | Map CVS user IDs to 'Name <email>' lines for proper Git authorship |
-i | Import only; do not check out a working tree afterward |
-k | Strip CVS keyword expansions ($Id$ etc.) from imported content |
-r <remote> | Place imported branches under refs/remotes/<remote>/ instead of local heads |
-s <subst> | Substitute character in branch names (CVS allows chars Git does not) |
git cvsimport -v -d /srv/cvs -C myproj.git -i myprojgit cvsimport -v -d :pserver:anon@127.0.0.1:/srv/cvs -A authors.txt myprojgit cvsimport -v -k -r cvs -d :pserver:anon@127.0.0.1:/srv/cvs myprojgit cvsimport -v -s _ -d :pserver:anon@127.0.0.1:/srv/cvs myprojHit each option, then Check answers. Score is recorded; Next is always open.