dev@local: ~/project — git
dev@local~/project$git checkout feature/new-ui
error: unknown revision or path not in working tree
Diagnostics Translation
Git could not parse your input as a valid commit, branch, or file path.
waiting for resolution...
LowVersion Control System

Reviewed for reference consistency: April 11, 2026

Code is Safe

SECURE

Git has paused the operation to protect your code. No data has been lost or corrupted.

What To Know

This parser failure means Git could not resolve the supplied token into a known revision or a valid tracked path in the current checkout.

Where Did It Fail?

Working Tree
Your local files
add
Staging Index
Prepared changes
commit
Local Repo
Commit history
push/fetch
Remote Server
GitHub/GitLab
The error involves the internal Git database or commit history structure.

Commands That Trigger This

$git checkout feature/new-ui
Running before running `git fetch` to download the branch from the server
$git log old-file.txt
Running when the file was never tracked by Git

Technical Background

01

This is a strict parser rejection. Git is saying 'I don't know what you are asking for.'

02

If you are trying to check out a remote branch, running `git fetch` first usually resolves this, as it downloads the remote reference so Git can recognize the branch name.

Underlying Causes

Typo in a commit hash, branch name, or file name
Trying to check out a remote branch that hasn't been fetched yet
Passing an argument to a command that expects a specific format

Frequently Asked Questions

If a coworker just pushed the branch, your local Git client doesn't know it exists until you explicitly fetch updates from the server.

Related Git States