Try the demo

fatal: Needed a single revision

git rev-parse --short takes one revision at a time.

The error

$ git rev-parse --short HEAD FETCH_HEAD
fatal: Needed a single revision

Why it happens

--short is --verify with a shorter answer, and --verify takes exactly one revision. Without --short, rev-parse takes several. The same message also means a ref that doesn't exist, such as FETCH_HEAD before any fetch.

The fix

One call per ref:

git rev-parse --short HEAD
git rev-parse --short FETCH_HEAD

Or full hashes for several refs in one call:

git rev-parse HEAD FETCH_HEAD

How DMN learned it

It came up, and was fixed, in 2 of our own sessions. DMN kept the fix as one line: `git rev-parse --short` implies --verify and accepts only one revision; run `git rev-parse --short <ref>` separately per ref (e.g. FETCH_HEAD, HEAD) to avoid 'Needed a single revision'.

DMN reads your agents' past sessions on your machine. When the same error is fixed the same way in two or more of them, it keeps the fix as a one-line lesson. When the error turns up again, Claude Code is told the fix straight away, and any agent can search what earlier sessions found. How DMN keeps what agents learn.

Stop fixing the same error twice