updated git doc
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-cherry.xml
blob18b17fa7788468351c12ab933bbe88f7cfc58508
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-cherry(1)">\r
5 <articleinfo>\r
6     <title>git-cherry(1)</title>\r
7 <indexterm>\r
8 <primary>git-cherry(1)</primary>\r
9 </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-cherry - Find commits not merged upstream</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git cherry</emphasis> [-v] [&lt;upstream&gt; [&lt;head&gt; [&lt;limit&gt;]]]</literallayout>\r
19 </blockquote>\r
20 </simplesect>\r
21 <simplesect id="_description">\r
22 <title>DESCRIPTION</title>\r
23 <simpara>The changeset (or "diff") of each commit between the fork-point and &lt;head&gt;\r
24 is compared against each commit between the fork-point and &lt;upstream&gt;.\r
25 The commits are compared with their <emphasis>patch id</emphasis>, obtained from\r
26 the <emphasis>git patch-id</emphasis> program.</simpara>\r
27 <simpara>Every commit that doesn't exist in the &lt;upstream&gt; branch\r
28 has its id (sha1) reported, prefixed by a symbol.  The ones that have\r
29 equivalent change already\r
30 in the &lt;upstream&gt; branch are prefixed with a minus (-) sign, and those\r
31 that only exist in the &lt;head&gt; branch are prefixed with a plus (+) symbol:</simpara>\r
32 <literallayout class="monospaced">           __*__*__*__*__&gt; &lt;upstream&gt;\r
33           /\r
34 fork-point\r
35           \__+__+__-__+__+__-__+__&gt; &lt;head&gt;</literallayout>\r
36 <simpara>If a &lt;limit&gt; has been given then the commits along the &lt;head&gt; branch up\r
37 to and including &lt;limit&gt; are not reported:</simpara>\r
38 <literallayout class="monospaced">           __*__*__*__*__&gt; &lt;upstream&gt;\r
39           /\r
40 fork-point\r
41           \__*__*__&lt;limit&gt;__-__+__&gt; &lt;head&gt;</literallayout>\r
42 <simpara>Because <emphasis>git cherry</emphasis> compares the changeset rather than the commit id\r
43 (sha1), you can use <emphasis>git cherry</emphasis> to find out if a commit you made locally\r
44 has been applied &lt;upstream&gt; under a different commit id.  For example,\r
45 this will happen if you're feeding patches &lt;upstream&gt; via email rather\r
46 than pushing or pulling commits directly.</simpara>\r
47 </simplesect>\r
48 <simplesect id="_options">\r
49 <title>OPTIONS</title>\r
50 <variablelist>\r
51 <varlistentry>\r
52 <term>\r
53 -v\r
54 </term>\r
55 <listitem>\r
56 <simpara>\r
57         Verbose.\r
58 </simpara>\r
59 </listitem>\r
60 </varlistentry>\r
61 <varlistentry>\r
62 <term>\r
63 &lt;upstream&gt;\r
64 </term>\r
65 <listitem>\r
66 <simpara>\r
67         Upstream branch to compare against.\r
68         Defaults to the first tracked remote branch, if available.\r
69 </simpara>\r
70 </listitem>\r
71 </varlistentry>\r
72 <varlistentry>\r
73 <term>\r
74 &lt;head&gt;\r
75 </term>\r
76 <listitem>\r
77 <simpara>\r
78         Working branch; defaults to HEAD.\r
79 </simpara>\r
80 </listitem>\r
81 </varlistentry>\r
82 <varlistentry>\r
83 <term>\r
84 &lt;limit&gt;\r
85 </term>\r
86 <listitem>\r
87 <simpara>\r
88         Do not report commits up to (and including) limit.\r
89 </simpara>\r
90 </listitem>\r
91 </varlistentry>\r
92 </variablelist>\r
93 </simplesect>\r
94 <simplesect id="_see_also">\r
95 <title>SEE ALSO</title>\r
96 <simpara><xref linkend="git-patch-id(1)" /></simpara>\r
97 </simplesect>\r
98 <simplesect id="_git">\r
99 <title>GIT</title>\r
100 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
101 </simplesect>\r
102 </article>\r