dev@local: ~/project — git
dev@local~/project$git checkout config
fatal: ambiguous argument
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Diagnostics Translation
Git doesn't know whether you are referring to a branch name or a 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 error means your input could be interpreted as more than one kind of thing, and Git refuses to guess whether you meant a path or a revision.

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
Git halted to protect the uncommitted files in your active working directory.

Commands That Trigger This

$git checkout config
Running when you have a file named config and a branch named config
$git log <branch>
Running when the branch name matches a tracked file

Technical Background

01

To solve this, Git uses a double-dash `--` as a standard separator. Everything before `--` is treated as a branch or revision, and everything after is treated as a file path.

02

For example: `git checkout -- build` restores the folder, while `git checkout build --` switches to the branch.

Underlying Causes

A branch name is identical to a file or folder name in the repository
Providing a commit hash that is too short and matches multiple objects
A typo in a command missing the `--` separator

Frequently Asked Questions

The double-dash is a standard POSIX convention used in many command-line tools to signal the end of command options and the beginning of positional arguments.

Related Git States