git-cvsimport - Linux


git-cvsimport converts a CVS repository into a Git repository. It’s useful when migrating from CVS to Git or integrating external CVS repositories into Git.


git cvsimport [options] [cvs-repository] [git-repository]


  • –cvsroot: CVSROOT to connect to
  • –ct: Collect timestamps from CSV during the import process
  • –dry-run: Perform a dry run without making changes
  • –encoding: Encoding of the CVS repository (default: ASCII)
  • –ignore-authors: Ignore author information from CVS
  • –no-checkout: Don’t checkout the default branch of the newly created Git repository
  • –no-detach: Don’t detach the HEAD from the repository tree
  • –verbose: Enable verbose output


Simple Import

Import a CVS repository into a new Git repository named "my-project":

git cvsimport /path/to/cvs/repository my-project

Import with Timestamps

Collect timestamps from CVS during import:

git cvsimport --ct /path/to/cvs/repository my-project

Import with Dry Run

Perform a dry run to preview changes without making them:

git cvsimport --dry-run /path/to/cvs/repository my-project

Common Issues

  • Missing author information: The --ignore-authors option can be used to ignore author information from CVS.
  • Timestamp conflicts: Timestamp conflicts can occur when multiple people commit changes simultaneously in both CVS and Git. To resolve this, use the git log --show-date-order command to sort commits chronologically and manually resolve any conflicts.


git-cvsimport can be integrated with other commands for advanced tasks. For example:

  • Create a Git archive of a CVS repository:
git cvsimport --ct /path/to/cvs/repository | git archive --format=tar --output=cvs-repo.tar

Related Commands

  • cvs
  • git-cvs-server