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