]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-cherry.txt
Documentation: rename gitlink macro to linkgit
[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--------
a8ebdb90 10'git-cherry' [-v] <upstream> [<head>] [<limit>]
7fc9d69f
JH
11
12DESCRIPTION
13-----------
81ae43cd
SE
14The changeset (or "diff") of each commit between the fork-point and <head>
15is compared against each commit between the fork-point and <upstream>.
16
6e7d76ba
JH
17Every commit that doesn't exist in the <upstream> branch
18has its id (sha1) reported, prefixed by a symbol. The ones that have
19equivalent change already
81ae43cd 20in the <upstream> branch are prefixed with a minus (-) sign, and those
a8ebdb90
RS
21that only exist in the <head> branch are prefixed with a plus (+) symbol:
22
23 __*__*__*__*__> <upstream>
24 /
25 fork-point
26 \__+__+__-__+__+__-__+__> <head>
27
28
29If a <limit> has been given then the commits along the <head> branch up
30to and including <limit> are not reported:
31
32 __*__*__*__*__> <upstream>
33 /
34 fork-point
35 \__*__*__<limit>__-__+__> <head>
36
81ae43cd
SE
37
38Because 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
40has been applied <upstream> under a different commit id. For example,
41this will happen if you're feeding patches <upstream> via email rather
42than pushing or pulling commits directly.
43
7fc9d69f
JH
44
45OPTIONS
46-------
52a22d1e
LAS
47-v::
48 Verbose.
7fc9d69f 49
52a22d1e
LAS
50<upstream>::
51 Upstream branch to compare against.
7fc9d69f 52
52a22d1e
LAS
53<head>::
54 Working branch; defaults to HEAD.
7fc9d69f 55
6894f49f
LFC
56<limit>::
57 Do not report commits up to (and including) limit.
58
7fc9d69f
JH
59Author
60------
61Written by Junio C Hamano <junkio@cox.net>
62
63Documentation
64--------------
65Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
66
67GIT
68---
5162e697 69Part of the linkgit:git[7] suite