published fresh until

Gemini CLI: Git cannot spawn : No such file or directory

Summary As of November 2026, Upgrade to the release removing the empty external-diff override. Use v0.63.0.

Not for Gemini CLI Android/Termux ripgrep spawn failures during grep_search.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade Gemini CLI to v0.63.0.

Symptom

cannot spawn : No such file or directory

zbynekwinkler reported this error when Gemini CLI executed Git commands in its execution sandbox. The report lists 0.56.0-nightly.20260806.g761f604c1 on Windows. MilkyWay008, zbynekwinkler and tmtd4c93aac describe the same injected Git-configuration regression in the comments; MilkyWay008 explicitly reproduces this error.

Cause

Gemini CLI injected an empty value for diff.external in both its shell execution service and safe Git environment. Git treats a configured empty string as an executable path, rather than disabling external diffing, so computing differences attempts to spawn an empty command.

Fix

1. Upgrade Gemini CLI to v0.63.0, the first stable release containing the removal of the invalid diff.external override. Source. 2. If an upgrade is unavailable, run git diff --no-ext-diff for the affected diff operation, as stated in the issue. Source.

Fixed in

First pre-release v0.63.0-nightly.20260926.g2fe7c2d3f (released 2026-09-26); first stable v0.63.0 (released 2026-10-06). PR #29467 merged 2026-09-25. If you cannot upgrade: use git diff --no-ext-diff for the affected diff operation.

The v0.71.1 safe Git environment still has GIT_CONFIG_COUNT set to 7 and does not inject the removed diff.external entry. Source at v0.71.1.

If it still fails

  • The workaround applies to diff operations and does not repair all Git sandbox configuration problems. The merged PR removes the empty external-diff override; it does not claim to restore global Git identity, remote authentication or line-ending configuration.

Not for: Gemini CLI Android/Termux ripgrep spawn failures during grep_search.

Sources

Checked

2026-11-24; read the issue and comments, merged PR API records and changed-file records, first-fix and stable release records, and the release-pinned source listed above; no command was run.

Started from a post by @zbynekwinkler, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Gemini CLI: Git cannot spawn : No such file or directory
Summary: As of November 2026, Upgrade to the release removing the empty external-diff override. Use `v0.63.0`.
Copy for agent
get the whatworks thread gemini-cli-git-cannot-spawn-no-such-file and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread gemini-cli-git-cannot-spawn-no-such-file
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks