1git-cvsimport(1) 2================ 3 4NAME 5---- 6git-cvsimport - Salvage your data out of another SCM people love to hate 7 8 9SYNOPSIS 10-------- 11[verse] 12'git-cvsimport' [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>] 13 [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>] 14 [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>] 15 [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>] 16 [-r <remote>] [<CVS_module>] 17 18 19DESCRIPTION 20----------- 21Imports a CVS repository into git. It will either create a new 22repository, or incrementally import into an existing one. 23 24Splitting the CVS log into patch sets is done by 'cvsps'. 25At least version 2.1 is required. 26 27You should *never* do any work of your own on the branches that are 28created by git-cvsimport. By default initial import will create and populate a 29"master" branch from the CVS repository's main branch which you're free 30to work with; after that, you need to 'git merge' incremental imports, or 31any CVS branches, yourself. It is advisable to specify a named remote via 32-r to separate and protect the incoming branches. 33 34 35OPTIONS 36------- 37-v:: 38 Verbosity: let 'cvsimport' report what it is doing. 39 40-d <CVSROOT>:: 41 The root of the CVS archive. May be local (a simple path) or remote; 42 currently, only the :local:, :ext: and :pserver: access methods 43 are supported. If not given, git-cvsimport will try to read it 44 from `CVS/Root`. If no such file exists, it checks for the 45 `CVSROOT` environment variable. 46 47<CVS_module>:: 48 The CVS module you want to import. Relative to <CVSROOT>. 49 If not given, git-cvsimport tries to read it from 50 `CVS/Repository`. 51 52-C <target-dir>:: 53 The git repository to import to. If the directory doesn't 54 exist, it will be created. Default is the current directory. 55 56-r <remote>:: 57 The git remote to import this CVS repository into. 58 Moves all CVS branches into remotes/<remote>/<branch> 59 akin to the git-clone --use-separate-remote option. 60 61-o <branch-for-HEAD>:: 62 When no remote is specified (via -r) the 'HEAD' branch 63 from CVS is imported to the 'origin' branch within the git 64 repository, as 'HEAD' already has a special meaning for git. 65 When a remote is specified the 'HEAD' branch is named 66 remotes/<remote>/master mirroring git-clone behaviour. 67 Use this option if you want to import into a different 68 branch. 69+ 70Use '-o master' for continuing an import that was initially done by 71the old cvs2git tool. 72 73-i:: 74 Import-only: don't perform a checkout after importing. This option 75 ensures the working directory and index remain untouched and will 76 not create them if they do not exist. 77 78-k:: 79 Kill keywords: will extract files with '-kk' from the CVS archive 80 to avoid noisy changesets. Highly recommended, but off by default 81 to preserve compatibility with early imported trees. 82 83-u:: 84 Convert underscores in tag and branch names to dots. 85 86-s <subst>:: 87 Substitute the character "/" in branch names with <subst> 88 89-p <options-for-cvsps>:: 90 Additional options for cvsps. 91 The options '-u' and '-A' are implicit and should not be used here. 92+ 93If you need to pass multiple options, separate them with a comma. 94 95-z <fuzz>:: 96 Pass the timestamp fuzz factor to cvsps, in seconds. If unset, 97 cvsps defaults to 300s. 98 99-P <cvsps-output-file>:: 100 Instead of calling cvsps, read the provided cvsps output file. Useful 101 for debugging or when cvsps is being handled outside cvsimport. 102 103-m:: 104 Attempt to detect merges based on the commit message. This option 105 will enable default regexes that try to capture the name source 106 branch name from the commit message. 107 108-M <regex>:: 109 Attempt to detect merges based on the commit message with a custom 110 regex. It can be used with '-m' to also see the default regexes. 111 You must escape forward slashes. 112 113-S <regex>:: 114 Skip paths matching the regex. 115 116-a:: 117 Import all commits, including recent ones. cvsimport by default 118 skips commits that have a timestamp less than 10 minutes ago. 119 120-L <limit>:: 121 Limit the number of commits imported. Workaround for cases where 122 cvsimport leaks memory. 123 124-A <author-conv-file>:: 125 CVS by default uses the Unix username when writing its 126 commit logs. Using this option and an author-conv-file 127 in this format 128+ 129--------- 130 exon=Andreas Ericsson <ae@op5.se> 131 spawn=Simon Pawn <spawn@frog-pond.org> 132 133--------- 134+ 135git-cvsimport will make it appear as those authors had 136their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly 137all along. 138+ 139For convenience, this data is saved to `$GIT_DIR/cvs-authors` 140each time the '-A' option is provided and read from that same 141file each time git-cvsimport is run. 142+ 143It is not recommended to use this feature if you intend to 144export changes back to CVS again later with 145gitlink:git-cvsexportcommit[1]. 146 147-h:: 148 Print a short usage message and exit. 149 150OUTPUT 151------ 152If '-v' is specified, the script reports what it is doing. 153 154Otherwise, success is indicated the Unix way, i.e. by simply exiting with 155a zero exit status. 156 157 158Author 159------ 160Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from 161various participants of the git-list <git@vger.kernel.org>. 162 163Documentation 164-------------- 165Documentation by Matthias Urlichs <smurf@smurf.noris.de>. 166 167GIT 168--- 169Part of the gitlink:git[7] suite 170