git-tag(1): -v option is a subcommand; fix code block
[git/jrn.git] / Documentation / git-cherry.txt
blob27b67b81a58956c48452b7aee46b9742ca02e31a
1 git-cherry(1)
2 =============
4 NAME
5 ----
6 git-cherry - Find commits not merged upstream
8 SYNOPSIS
9 --------
10 'git-cherry' [-v] <upstream> [<head>] [<limit>]
12 DESCRIPTION
13 -----------
14 The changeset (or "diff") of each commit between the fork-point and <head>
15 is compared against each commit between the fork-point and <upstream>.
17 Every commit that doesn't exist in the <upstream> branch
18 has its id (sha1) reported, prefixed by a symbol.  The ones that have
19 equivalent change already
20 in the <upstream> branch are prefixed with a minus (-) sign, and those
21 that only exist in the <head> branch are prefixed with a plus (+) symbol:
23                __*__*__*__*__> <upstream>
24               /
25     fork-point
26               \__+__+__-__+__+__-__+__> <head>
29 If a <limit> has been given then the commits along the <head> branch up
30 to and including <limit> are not reported:
32                __*__*__*__*__> <upstream>
33               /
34     fork-point
35               \__*__*__<limit>__-__+__> <head>
38 Because git-cherry compares the changeset rather than the commit id
39 (sha1), you can use git-cherry to find out if a commit you made locally
40 has been applied <upstream> under a different commit id.  For example,
41 this will happen if you're feeding patches <upstream> via email rather
42 than pushing or pulling commits directly.
45 OPTIONS
46 -------
47 -v::
48         Verbose.
50 <upstream>::
51         Upstream branch to compare against.
53 <head>::
54         Working branch; defaults to HEAD.
56 Author
57 ------
58 Written by Junio C Hamano <junkio@cox.net>
60 Documentation
61 --------------
62 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
64 GIT
65 ---
66 Part of the gitlink:git[7] suite