Skip to content

Commit 81ae43c

Browse files
loopsJunio C Hamano
authored andcommitted
Clarify git-cherry documentation.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent ae0b219 commit 81ae43c

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

Documentation/git-cherry.txt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,20 @@ SYNOPSIS
1111

1212
DESCRIPTION
1313
-----------
14-
Each commit between the fork-point and <head> is examined, and compared against
15-
the change each commit between the fork-point and <upstream> introduces.
16-
Commits already included in upstream are prefixed with '-' (meaning "drop from
17-
my local pull"), while commits missing from upstream are prefixed with '+'
18-
(meaning "add to the updated upstream").
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>.
16+
17+
Every commit with a changeset that doesn't exist in the other branch
18+
has its id (sha1) reported, prefixed by a symbol. Those existing only
19+
in the <upstream> branch are prefixed with a minus (-) sign, and those
20+
that only exist in the <head> branch are prefixed with a plus (+) symbol.
21+
22+
Because git-cherry compares the changeset rather than the commit id
23+
(sha1), you can use git-cherry to find out if a commit you made locally
24+
has been applied <upstream> under a different commit id. For example,
25+
this will happen if you're feeding patches <upstream> via email rather
26+
than pushing or pulling commits directly.
27+
1928

2029
OPTIONS
2130
-------

0 commit comments

Comments
 (0)