]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-cherry.txt
user-manual: use -o latest.tar.gz to create a gzipped tarball
[thirdparty/git.git] / Documentation / git-cherry.txt
CommitLineData
7fc9d69f
JH
1git-cherry(1)
2=============
3
4NAME
5----
7bd7f280 6git-cherry - Find commits not merged upstream
7fc9d69f
JH
7
8SYNOPSIS
9--------
7791a1d9 10[verse]
3bc52d7a 11'git cherry' [-v] [<upstream> [<head> [<limit>]]]
7fc9d69f
JH
12
13DESCRIPTION
14-----------
81ae43cd
SE
15The changeset (or "diff") of each commit between the fork-point and <head>
16is compared against each commit between the fork-point and <upstream>.
483bc4f0 17The commits are compared with their 'patch id', obtained from
0b444cdb 18the 'git patch-id' program.
81ae43cd 19
6e7d76ba
JH
20Every commit that doesn't exist in the <upstream> branch
21has its id (sha1) reported, prefixed by a symbol. The ones that have
22equivalent change already
81ae43cd 23in the <upstream> branch are prefixed with a minus (-) sign, and those
a8ebdb90
RS
24that only exist in the <head> branch are prefixed with a plus (+) symbol:
25
26 __*__*__*__*__> <upstream>
27 /
28 fork-point
29 \__+__+__-__+__+__-__+__> <head>
30
31
32If a <limit> has been given then the commits along the <head> branch up
33to and including <limit> are not reported:
34
35 __*__*__*__*__> <upstream>
36 /
37 fork-point
38 \__*__*__<limit>__-__+__> <head>
39
81ae43cd 40
0b444cdb
TR
41Because 'git cherry' compares the changeset rather than the commit id
42(sha1), you can use 'git cherry' to find out if a commit you made locally
81ae43cd
SE
43has been applied <upstream> under a different commit id. For example,
44this will happen if you're feeding patches <upstream> via email rather
45than pushing or pulling commits directly.
46
7fc9d69f
JH
47
48OPTIONS
49-------
52a22d1e
LAS
50-v::
51 Verbose.
7fc9d69f 52
52a22d1e
LAS
53<upstream>::
54 Upstream branch to compare against.
f2968022 55 Defaults to the first tracked remote branch, if available.
7fc9d69f 56
52a22d1e
LAS
57<head>::
58 Working branch; defaults to HEAD.
7fc9d69f 59
6894f49f
LFC
60<limit>::
61 Do not report commits up to (and including) limit.
62
a7052d35
JH
63SEE ALSO
64--------
65linkgit:git-patch-id[1]
66
7fc9d69f
JH
67GIT
68---
9e1f0a85 69Part of the linkgit:git[1] suite