1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
\r
4 <sect2 lang="en" id="git-cherry(1)">
\r
5 <title>git-cherry(1)</title>
\r
7 <primary>git-cherry(1)</primary>
\r
9 <simplesect id="git-cherry(1)__name">
\r
11 <simpara>git-cherry - Find commits not merged upstream</simpara>
\r
13 <simplesect id="git-cherry(1)__synopsis">
\r
14 <title>SYNOPSIS</title>
\r
16 <literallayout><emphasis>git cherry</emphasis> [-v] [<upstream> [<head> [<limit>]]]</literallayout>
\r
19 <simplesect id="git-cherry(1)__description">
\r
20 <title>DESCRIPTION</title>
\r
21 <simpara>The changeset (or "diff") of each commit between the fork-point and <head>
\r
22 is compared against each commit between the fork-point and <upstream>.
\r
23 The commits are compared with their <emphasis>patch id</emphasis>, obtained from
\r
24 the <emphasis>git patch-id</emphasis> program.</simpara>
\r
25 <simpara>Every commit that doesn't exist in the <upstream> branch
\r
26 has its id (sha1) reported, prefixed by a symbol. The ones that have
\r
27 equivalent change already
\r
28 in the <upstream> branch are prefixed with a minus (-) sign, and those
\r
29 that only exist in the <head> branch are prefixed with a plus (+) symbol:</simpara>
\r
30 <literallayout class="monospaced"> __*__*__*__*__> <upstream>
\r
33 \__+__+__-__+__+__-__+__> <head></literallayout>
\r
34 <simpara>If a <limit> has been given then the commits along the <head> branch up
\r
35 to and including <limit> are not reported:</simpara>
\r
36 <literallayout class="monospaced"> __*__*__*__*__> <upstream>
\r
39 \__*__*__<limit>__-__+__> <head></literallayout>
\r
40 <simpara>Because <emphasis>git cherry</emphasis> compares the changeset rather than the commit id
\r
41 (sha1), you can use <emphasis>git cherry</emphasis> to find out if a commit you made locally
\r
42 has been applied <upstream> under a different commit id. For example,
\r
43 this will happen if you're feeding patches <upstream> via email rather
\r
44 than pushing or pulling commits directly.</simpara>
\r
46 <simplesect id="git-cherry(1)__options">
\r
47 <title>OPTIONS</title>
\r
65 Upstream branch to compare against.
\r
66 Defaults to the first tracked remote branch, if available.
\r
76 Working branch; defaults to HEAD.
\r
86 Do not report commits up to (and including) limit.
\r
92 <simplesect id="git-cherry(1)__see_also">
\r
93 <title>SEE ALSO</title>
\r
94 <simpara><xref linkend="git-patch-id(1)" /></simpara>
\r
96 <simplesect id="git-cherry(1)__git">
\r
98 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r