dev@local: ~/project — git
dev@local~/project$git sparse-checkout set backend/api
warning: sparse checkout leaves no entry on working directory
Diagnostics Translation
Your sparse-checkout rules excluded all files, leaving your working directory empty.
waiting for resolution...
MediumVersion 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 warning means your sparse rules successfully filtered the checkout, but they filtered out every visible file path in the current branch.

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 operation was blocked at the staging area. Git cannot prepare or finalize the commit.

Commands That Trigger This

$git sparse-checkout set backend/api
Running when the folder is actually named `backend/services`
$Initializing a sparse checkout on a branch where the target directory was deleted
Initializing a sparse checkout on a branch where the target directory was deleted

Technical Background

01

Git strictly follows the inclusion patterns you define.

02

This error is Git's way of warning you that your checkout command succeeded, but the resulting workspace is entirely empty because the filter matched zero files.

Underlying Causes

Typo in the `.git/info/sparse-checkout` configuration file
Setting a sparse filter for a directory that does not exist in the repository
Initializing sparse-checkout but forgetting to add any include patterns

Frequently Asked Questions

Because the sparse rules were technically valid, but they matched nothing visible in the current branch, leaving you with a checkout that contains no working files.

Related Git States