From 900acb10b86c97bbac3313d065eace8de5cd81ba Mon Sep 17 00:00:00 2001 From: Florian Best Date: Tue, 17 Mar 2026 23:49:44 +0100 Subject: [PATCH] docs(cherry-pick): document CHERRY_PICK_HEAD ref When a cherry-pick stops due to conflicts, it is not always obvious which commit is currently being applied or how to inspect its changes. Although the CHERRY_PICK_HEAD reference is mentioned in the documentation, it can be easy to overlook and is not presented as a practical way to inspect the in-progress commit. Add an example showing `git show CHERRY_PICK_HEAD` to make this workflow more discoverable. This provides a simple and flexible way to inspect the current commit, similar in spirit to `rebase --show-current-patch`, without introducing new options. Signed-off-by: Florian Best --- Documentation/git-cherry-pick.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/git-cherry-pick.adoc b/Documentation/git-cherry-pick.adoc index 42b41923d5f0bc..21de8bbb0ee5cb 100644 --- a/Documentation/git-cherry-pick.adoc +++ b/Documentation/git-cherry-pick.adoc @@ -228,6 +228,12 @@ EXAMPLES so the result can be inspected and made into a single new commit if suitable. +`git show CHERRY_PICK_HEAD`:: + + Show the commit currently being applied when a cherry-pick + stops due to conflicts. The `CHERRY_PICK_HEAD` reference + identifies this commit. + The following sequence attempts to backport a patch, bails out because the code the patch applies to has changed too much, and then tries again, this time exercising more care about matching up context lines.