updated git doc
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-cvsexportcommit.xml
blob208a848f44ec6157be741d3ae71c8a9e7732fe5d
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-cvsexportcommit(1)">\r
5 <articleinfo>\r
6     <title>git-cvsexportcommit(1)</title>\r
7 <indexterm>\r
8 <primary>git-cvsexportcommit(1)</primary>\r
9 </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-cvsexportcommit - Export a single commit to a CVS checkout</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git cvsexportcommit</emphasis> [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot]\r
19         [-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID</literallayout>\r
20 </blockquote>\r
21 </simplesect>\r
22 <simplesect id="_description">\r
23 <title>DESCRIPTION</title>\r
24 <simpara>Exports a commit from GIT to a CVS checkout, making it easier\r
25 to merge patches from a git repository into a CVS repository.</simpara>\r
26 <simpara>Specify the name of a CVS checkout using the -w switch or execute it\r
27 from the root of the CVS working copy. In the latter case GIT_DIR must\r
28 be defined. See examples below.</simpara>\r
29 <simpara>It does its best to do the safe thing, it will check that the files are\r
30 unchanged and up to date in the CVS checkout, and it will not autocommit\r
31 by default.</simpara>\r
32 <simpara>Supports file additions, removals, and commits that affect binary files.</simpara>\r
33 <simpara>If the commit is a merge commit, you must tell <emphasis>git cvsexportcommit</emphasis> what\r
34 parent the changeset should be done against.</simpara>\r
35 </simplesect>\r
36 <simplesect id="_options">\r
37 <title>OPTIONS</title>\r
38 <variablelist>\r
39 <varlistentry>\r
40 <term>\r
41 -c\r
42 </term>\r
43 <listitem>\r
44 <simpara>\r
45         Commit automatically if the patch applied cleanly. It will not\r
46         commit if any hunks fail to apply or there were other problems.\r
47 </simpara>\r
48 </listitem>\r
49 </varlistentry>\r
50 <varlistentry>\r
51 <term>\r
52 -p\r
53 </term>\r
54 <listitem>\r
55 <simpara>\r
56         Be pedantic (paranoid) when applying patches. Invokes patch with\r
57         --fuzz=0\r
58 </simpara>\r
59 </listitem>\r
60 </varlistentry>\r
61 <varlistentry>\r
62 <term>\r
63 -a\r
64 </term>\r
65 <listitem>\r
66 <simpara>\r
67         Add authorship information. Adds Author line, and Committer (if\r
68         different from Author) to the message.\r
69 </simpara>\r
70 </listitem>\r
71 </varlistentry>\r
72 <varlistentry>\r
73 <term>\r
74 -d\r
75 </term>\r
76 <listitem>\r
77 <simpara>\r
78         Set an alternative CVSROOT to use.  This corresponds to the CVS\r
79         -d parameter.  Usually users will not want to set this, except\r
80         if using CVS in an asymmetric fashion.\r
81 </simpara>\r
82 </listitem>\r
83 </varlistentry>\r
84 <varlistentry>\r
85 <term>\r
86 -f\r
87 </term>\r
88 <listitem>\r
89 <simpara>\r
90         Force the merge even if the files are not up to date.\r
91 </simpara>\r
92 </listitem>\r
93 </varlistentry>\r
94 <varlistentry>\r
95 <term>\r
96 -P\r
97 </term>\r
98 <listitem>\r
99 <simpara>\r
100         Force the parent commit, even if it is not a direct parent.\r
101 </simpara>\r
102 </listitem>\r
103 </varlistentry>\r
104 <varlistentry>\r
105 <term>\r
106 -m\r
107 </term>\r
108 <listitem>\r
109 <simpara>\r
110         Prepend the commit message with the provided prefix.\r
111         Useful for patch series and the like.\r
112 </simpara>\r
113 </listitem>\r
114 </varlistentry>\r
115 <varlistentry>\r
116 <term>\r
117 -u\r
118 </term>\r
119 <listitem>\r
120 <simpara>\r
121         Update affected files from CVS repository before attempting export.\r
122 </simpara>\r
123 </listitem>\r
124 </varlistentry>\r
125 <varlistentry>\r
126 <term>\r
127 -k\r
128 </term>\r
129 <listitem>\r
130 <simpara>\r
131         Reverse CVS keyword expansion (e.g. $Revision: 1.2.3.4$\r
132         becomes $Revision$) in working CVS checkout before applying patch.\r
133 </simpara>\r
134 </listitem>\r
135 </varlistentry>\r
136 <varlistentry>\r
137 <term>\r
138 -w\r
139 </term>\r
140 <listitem>\r
141 <simpara>\r
142         Specify the location of the CVS checkout to use for the export. This\r
143         option does not require GIT_DIR to be set before execution if the\r
144         current directory is within a git repository.  The default is the\r
145         value of <emphasis>cvsexportcommit.cvsdir</emphasis>.\r
146 </simpara>\r
147 </listitem>\r
148 </varlistentry>\r
149 <varlistentry>\r
150 <term>\r
151 -W\r
152 </term>\r
153 <listitem>\r
154 <simpara>\r
155         Tell cvsexportcommit that the current working directory is not only\r
156         a Git checkout, but also the CVS checkout.  Therefore, Git will\r
157         reset the working directory to the parent commit before proceeding.\r
158 </simpara>\r
159 </listitem>\r
160 </varlistentry>\r
161 <varlistentry>\r
162 <term>\r
163 -v\r
164 </term>\r
165 <listitem>\r
166 <simpara>\r
167         Verbose.\r
168 </simpara>\r
169 </listitem>\r
170 </varlistentry>\r
171 </variablelist>\r
172 </simplesect>\r
173 <simplesect id="_configuration">\r
174 <title>CONFIGURATION</title>\r
175 <variablelist>\r
176 <varlistentry>\r
177 <term>\r
178 cvsexportcommit.cvsdir\r
179 </term>\r
180 <listitem>\r
181 <simpara>\r
182         The default location of the CVS checkout to use for the export.\r
183 </simpara>\r
184 </listitem>\r
185 </varlistentry>\r
186 </variablelist>\r
187 </simplesect>\r
188 <simplesect id="_examples">\r
189 <title>EXAMPLES</title>\r
190 <variablelist>\r
191 <varlistentry>\r
192 <term>\r
193 Merge one patch into CVS\r
194 </term>\r
195 <listitem>\r
196 <screen>$ export GIT_DIR=~/project/.git\r
197 $ cd ~/project_cvs_checkout\r
198 $ git cvsexportcommit -v &lt;commit-sha1&gt;\r
199 $ cvs commit -F .msg &lt;files&gt;</screen>\r
200 </listitem>\r
201 </varlistentry>\r
202 <varlistentry>\r
203 <term>\r
204 Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo\r
205 </term>\r
206 <listitem>\r
207 <screen>        $ git cvsexportcommit -v -c -w ~/project_cvs_checkout &lt;commit-sha1&gt;</screen>\r
208 </listitem>\r
209 </varlistentry>\r
210 <varlistentry>\r
211 <term>\r
212 Merge pending patches into CVS automatically -- only if you really know what you are doing\r
213 </term>\r
214 <listitem>\r
215 <screen>$ export GIT_DIR=~/project/.git\r
216 $ cd ~/project_cvs_checkout\r
217 $ git cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git cvsexportcommit -c -p -v</screen>\r
218 </listitem>\r
219 </varlistentry>\r
220 </variablelist>\r
221 </simplesect>\r
222 <simplesect id="_git">\r
223 <title>GIT</title>\r
224 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
225 </simplesect>\r
226 </article>\r