Desk Clarity

A field guide to everyday digital problems.

Developer tools / Practical guide

Git Cherry-Pick Is Empty: Inspect the Result Before Skipping

Distinguish an already-present change from an intentional empty audit commit.

By ON Lab3 min readSources checked November 10, 2026 (KST)

An empty cherry-pick means there is no remaining staged change to record at that point. Inspect status and the intended patch before choosing skip, an intentional empty commit or abort. Do not reset unrelated history merely to clear the message.

Reproduce the boundary in a disposable fixture

Distinguish an already-present change from an intentional empty audit commit.

Use a new empty temporary directory for this fixture. The example creates only local test data. Commands marked with example.invalid do not identify a real service.

git init -q demo
cd demo
git config user.name Fixture
git config user.email fixture@example.invalid
printf 'base
' > item.txt
git add item.txt
git commit -qm base
base=$(git rev-parse HEAD)
printf 'change
' >> item.txt
git commit -qam change
change=$(git rev-parse HEAD)
git checkout -qb target "$base"
printf 'change
' >> item.txt
git commit -qam equivalent
if git cherry-pick "$change" >../pick.txt 2>&1; then exit 1; fi
git status --short
git diff --cached
git show --stat "$change"
git cherry-pick --skip
test "$(git rev-list --count HEAD)" = 2

Observed result

commit 57b75f97a9ce18f8b4bf24836650b3ca5a75e714
Author: Fixture <fixture@example.invalid>
Date:   Tue Nov 10 01:40:54 2026 +0900

    change

 item.txt | 1 +
 1 file changed, 1 insertion(+)

What the result means

The target already has an equivalent edit under a different commit. Applying the source commit produces no new file content, so there is no staged patch to commit. The fixture skips it and retains the target history. In a real conflict resolution, an empty result could also mean you accidentally chose away the intended edit. The message alone cannot distinguish these cases.

Choose the correction for your workflow

Compare git show SOURCE_COMMIT with the target file and inspect git diff --cached before acting. Use git cherry-pick --skip when that source change is already present or intentionally unnecessary. If an empty record is required by your audit policy, follow the current Git guidance for recording it, then finish the sequencer as appropriate. Current Git documents --empty=drop, keep and stop for commits that become redundant; confirm support in git cherry-pick -h before adding these options to automation. Commits originally created empty are a separate case.

Limits and the next check

Run recovery commands only after preserving any work that is not part of the operation. --abort returns from the cherry-pick sequence; --quit forgets sequencer state and is a different choice. Older Git versions may not support current empty handling flags. The local fixture checks skip with an already-equivalent patch; it does not reproduce every conflict resolution or merge-commit case.

Related: Compare the related workflow boundary.

This isolated example was executed on macOS on November 10, 2026 (KST). Available tools: node v26.5.0, git git version 2.39.3 (Apple Git-145), npm 11.17.0, jq jq-1.7.1-apple. Shell fixtures use Bash and repository-path identity uses Python 3. This checks the illustrated contract, not your project, host service or every tool version.

Sources & further reading