1git-cvsexportcommit(1) 2====================== 3 4NAME 5---- 6git-cvsexportcommit - Export a single commit to a CVS checkout 7 8 9SYNOPSIS 10-------- 11'git cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] 12 [-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID 13 14 15DESCRIPTION 16----------- 17Exports a commit from GIT to a CVS checkout, making it easier 18to merge patches from a git repository into a CVS repository. 19 20Specify the name of a CVS checkout using the -w switch or execute it 21from the root of the CVS working copy. In the latter case GIT_DIR must 22be defined. See examples below. 23 24It does its best to do the safe thing, it will check that the files are 25unchanged and up to date in the CVS checkout, and it will not autocommit 26by default. 27 28Supports file additions, removals, and commits that affect binary files. 29 30If the commit is a merge commit, you must tell 'git-cvsexportcommit' what 31parent the changeset should be done against. 32 33OPTIONS 34------- 35 36-c:: 37 Commit automatically if the patch applied cleanly. It will not 38 commit if any hunks fail to apply or there were other problems. 39 40-p:: 41 Be pedantic (paranoid) when applying patches. Invokes patch with 42 --fuzz=0 43 44-a:: 45 Add authorship information. Adds Author line, and Committer (if 46 different from Author) to the message. 47 48-d:: 49 Set an alternative CVSROOT to use. This corresponds to the CVS 50 -d parameter. Usually users will not want to set this, except 51 if using CVS in an asymmetric fashion. 52 53-f:: 54 Force the merge even if the files are not up to date. 55 56-P:: 57 Force the parent commit, even if it is not a direct parent. 58 59-m:: 60 Prepend the commit message with the provided prefix. 61 Useful for patch series and the like. 62 63-u:: 64 Update affected files from CVS repository before attempting export. 65 66-k:: 67 Reverse CVS keyword expansion (e.g. $Revision: 1.2.3.4$ 68 becomes $Revision$) in working CVS checkout before applying patch. 69 70-w:: 71 Specify the location of the CVS checkout to use for the export. This 72 option does not require GIT_DIR to be set before execution if the 73 current directory is within a git repository. The default is the 74 value of 'cvsexportcommit.cvsdir'. 75 76-W:: 77 Tell cvsexportcommit that the current working directory is not only 78 a Git checkout, but also the CVS checkout. Therefore, Git will 79 reset the working directory to the parent commit before proceeding. 80 81-v:: 82 Verbose. 83 84CONFIGURATION 85------------- 86cvsexportcommit.cvsdir:: 87 The default location of the CVS checkout to use for the export. 88 89EXAMPLES 90-------- 91 92Merge one patch into CVS:: 93+ 94------------ 95$ export GIT_DIR=~/project/.git 96$ cd ~/project_cvs_checkout 97$ git cvsexportcommit -v <commit-sha1> 98$ cvs commit -F .msg <files> 99------------ 100 101Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo:: 102+ 103------------ 104 $ git cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1> 105------------ 106 107Merge pending patches into CVS automatically -- only if you really know what you are doing:: 108+ 109------------ 110$ export GIT_DIR=~/project/.git 111$ cd ~/project_cvs_checkout 112$ git cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git cvsexportcommit -c -p -v 113------------ 114 115Author 116------ 117Written by Martin Langhoff <martin@catalyst.net.nz> and others. 118 119Documentation 120-------------- 121Documentation by Martin Langhoff <martin@catalyst.net.nz> and others. 122 123GIT 124--- 125Part of the linkgit:git[1] suite