---
title: "Tell the next engineer which fixes are already on the release branch | Proofline"
description: "Use git cherry -v release main to list which commits from main have an equivalent on the release branch, and record the source with git cherry-pick -x."
url: https://proofline.sh/learn/backport-commits-already-picked/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# Tell the next engineer which fixes are already on the release branch

Use git cherry -v release main to list which commits from main have an equivalent on the release branch, and record the source with git cherry-pick -x. The output of git log release..main cannot answer the question, because a cherry-picked commit has a new ID.

Deployment failures The Proofline team November 24, 2026 2 min read

## Two lists that disagree

In the fixture, `main` has "fix b" and "fix c". The release branch received "fix b" by cherry-pick.

```
$ git log --oneline rel..main
a1092a2 fix c
6eaa3da fix b

$ git cherry -v rel main
- 6eaa3da... fix b
+ a1092a2... fix c
```

The log lists both as missing. `git cherry` compares patches and marks an equivalent one with `-`. Its [manual](https://git-scm.com/docs/git-cherry) says the test is based on the diff, after removing whitespace and line numbers.

## Where the patch comparison fails

The second fixture picks a fix onto a release branch whose neighboring line differs. The pick conflicts, and the resolution keeps the fix. Its patch now has different context:

```
$ git cherry -v rel main
+ 12d2232... fix l2
```

The fix is on the branch, and the command says it is not. The `-x` line still connects the two, since the picked commit's message ends with:

```
(cherry picked from commit 12d2232b57c782043a5eeee38fb41b4fe22ab050)
```

So the two sources have opposite weaknesses. Both were run with Git 2.43.

|  | Says picked | Says missing |
| --- | --- | --- |
| `git cherry` | An equivalent patch is there | Missing, or adapted during a conflict |
| `-x` line | Someone picked that commit, perhaps adapting it | Missing, or picked without `-x`, or the line was edited out |

Neither one tells you whether the fix works on the release branch. A commit can be picked and later reverted, and both lists still count it.

## Build the list to hand over

```
git cherry -v rel main | grep '^+' > open.txt
git log rel --not main --format='%h %s%n%b' | grep -E '^[0-9a-f]{7,} |cherry picked from'
```

For each line in `open.txt`, look for its ID in the second output. Then sort what is left:

| State | Next decision |
| --- | --- |
| Equivalent patch | None, unless it was reverted later |
| Marked `+`, with an `-x` line | Read the adapted pick and run its test on the release branch |
| Marked `+`, with no `-x` line | Decide whether to backport, and say why not if you skip it |

Search for reverts with `git log rel --grep='^Revert' --oneline`.

## Worked example

This example is fictional. Ana hands Ben the 4.2 branch before her leave. Her note says "all security fixes are in". Ben runs `git cherry` and finds six `+` lines. Four have `-x` lines in adapted commits, whose tests pass on the branch. One is a documentation change. The sixth has neither, and its advisory covers 4.2. Ben's decision is one backport, and the note he adds to the branch lists all six with the reason for each.

If the fix has to travel without a shared remote, send it as [a patch with its base](/learn/git-format-patch-base-commit/). Return to [handing over evidence](/learn/engineering-handoff-evidence/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Record the base commit when you send a patch](/learn/git-format-patch-base-commit/)
    
    Deployment failures The Proofline team November 24, 2026 3 min read
    
-   ### [Reland a reverted merge without losing half of it](/learn/reland-after-revert/)
    
    Deployment failures The Proofline team November 24, 2026 3 min read
