How to fix No stash entries found. in Git

GitBEGINNERLOWUpdated Dec 6, 2025ยท 161 views

This Git error occurs when you attempt to apply, pop, or drop a stash but no stashes exist in your stash list. The stash may have already been applied, dropped, or was never created in the first place.

Quick fix

Fixes No stash entries found.

# List all stash entries
git stash list
  1. Verify the stash list is empty
  2. Check if the stash was already applied
  3. Attempt to recover a dropped stash
  4. Check if changes went to untracked files
git โ€” error
# List all stash entries
git stash list
No stash entries found.

What this error means

The error "No stash entries found" appears when you run a git stash command that expects to operate on an existing stash, but the stash list is empty. This commonly happens with commands like `git stash pop`, `git stash apply`, `git stash drop`, or `git stash show`. Git's stash is a stack-based storage mechanism that temporarily saves uncommitted changes so you can switch branches or pull updates without committing work in progress. When you "pop" a stash, Git applies the changes and removes the stash entry from the list. This error typically occurs when: - The stash was already applied and dropped by a previous `git stash pop` - The stash list was cleared with `git stash clear` - A stash was never created in the first place - The stash was dropped manually with `git stash drop` - You're in a different repository than where the stash was created

Typical symptoms

  • Running 'git stash pop' fails with 'No stash entries found'
  • git stash apply returns 'No stash entries found' error
  • git stash show displays nothing or shows the error
  • git stash list returns empty output
  • Previously stashed changes seem to have disappeared
  • CI/CD pipeline fails at deployment step with stash error
  • Running git stash drop says no stash entries exist

Common causes

  1. Stash was already applied and removed by a previous 'git stash pop' command
  2. Stash list was cleared using 'git stash clear'
  3. Stash was manually dropped with 'git stash drop'
  4. No stash was ever created - changes were committed or discarded instead
  5. Working in a different Git repository than where the stash was created
  6. Untracked files were not included when stashing (git stash doesn't include untracked files by default)
  7. Repository was cloned fresh and stashes don't transfer between clones
  8. Stash was garbage collected after being unreachable for too long

How to fix "No stash entries found."

1Verify the stash list is empty

First, confirm that there are no stash entries:

bash
# List all stash entries
git stash list

If this returns nothing (no output), the stash list is empty. If you see entries like stash@{0}: WIP on main: abc1234 commit message, then stashes exist and the error might be from a different issue.

You can also check the total count:

bash
# Count stash entries
git stash list | wc -l
2Check if the stash was already applied

If you previously ran git stash pop successfully, the stash would have been applied AND removed. The changes should now be in your working directory.

bash
# Check for uncommitted changes in working directory
git status

# View recent changes
git diff

If you see your previously stashed changes here, you're all set - the stash worked! The "No stash entries found" error on a subsequent pop is expected because the stash was already consumed.

Tip: Use git stash apply instead of git stash pop if you want to keep the stash entry after applying. This allows you to re-apply the same stash multiple times.

3Attempt to recover a dropped stash

If a stash was accidentally dropped or cleared, you may be able to recover it if Git hasn't garbage collected it yet.

bash
# Find unreachable stash commits
git fsck --unreachable | grep commit | cut -d' ' -f3 | xargs git log --merges --no-walk --grep=WIP

Or use this more comprehensive command:

bash
# Find all dangling commits (potential stashes)
git fsck --no-reflogs | grep commit | cut -d' ' -f3 | xargs git log --oneline --graph --decorate

If you find your stash commit, note the SHA hash and recover it:

bash
# Apply the recovered stash directly
git stash apply <commit-hash>

# Or re-add it to the stash list
git update-ref refs/stash <commit-hash> --create-reflog

Note: This only works if the stash hasn't been garbage collected. Git typically keeps unreachable objects for at least 2 weeks by default.

4Check if changes went to untracked files

By default, git stash does NOT include untracked files. If your changes were in new files that weren't added to Git, they weren't stashed.

bash
# Check for untracked files
git status --porcelain

# Look for files marked with '??' (untracked)
git status -u

For future stashes, include untracked files:

bash
# Stash including untracked files
git stash -u
# or
git stash --include-untracked

# Stash including untracked AND ignored files
git stash -a
# or
git stash --all

If you lost untracked files, check if your editor has local history (VS Code has "Local History: Find Entry to Restore").

5Verify you are in the correct repository

Stashes are repository-specific. If you have multiple Git repositories, make sure you're in the right one.

bash
# Show the repository root directory
git rev-parse --show-toplevel

# Show your current directory
pwd

# Show the remote URL to verify the repository
git remote -v

If you created the stash in a different repository:

bash
# Navigate to the correct repository
cd /path/to/correct/repo

# Now check for stashes
git stash list

Remember: Stashes are local and do not transfer when you clone a repository or push to a remote.

6Check recent git reflog for stash operations

The reflog tracks recent Git operations and might show what happened to your stash.

bash
# View stash-related reflog entries
git reflog show stash

# View general reflog for recent operations
git reflog | head -20

Look for entries like:
- stash@{0}: drop stash@{0}: ... - indicates stash was dropped
- stash@{0}: reset: ... - indicates stash was applied/popped

If you see when the stash was dropped, the commit hash might help recover it using the git fsck method from Step 3.

7Create a new stash for future use

If you need to stash current changes and avoid this error in the future:

bash
# Basic stash (tracked files only)
git stash

# Stash with a descriptive message
git stash save "WIP: feature description"
# or (newer syntax)
git stash push -m "WIP: feature description"

# Include untracked files
git stash -u -m "Including untracked files"

# Verify the stash was created
git stash list

Best practices to avoid losing stashes:
1. Use git stash apply instead of git stash pop when testing
2. Give stashes descriptive messages with -m
3. Don't rely on stashes for long-term storage - commit to a branch instead
4. Regularly check git stash list to know what's stashed

Advanced notes

How Git Stash Works Internally:

Git stash creates special commits that are not part of any branch. When you run git stash, Git creates:
1. A commit for the working directory state (your changes)
2. A commit for the index/staging area state
3. A merge commit combining both, referenced by refs/stash

The stash is stored as a reflog at .git/refs/stash and .git/logs/refs/stash. When you pop or drop a stash, the reference is updated but the commits remain in the object database until garbage collection.

Stash vs. Branch:

For changes you might need to keep for more than a day, consider using a branch instead:

bash
# Instead of stash
git checkout -b wip/my-feature
git add .
git commit -m "WIP: work in progress"

# When ready to continue
git checkout wip/my-feature

Branches are more visible, can be pushed to remotes, and are less likely to be accidentally lost.

Garbage Collection and Stash Recovery:

Dropped stashes become "dangling commits" and will eventually be garbage collected. The default expiry is:
- 30 days for unreachable objects in the reflog
- 2 weeks for other unreachable objects

You can extend this:

bash
# Check GC settings
git config gc.reflogExpire
git config gc.reflogExpireUnreachable

# Prevent immediate GC of unreachable objects
git config gc.pruneExpire "30 days"

Stash in Scripts and CI/CD:

When using stash in scripts, always check if there's something to stash first:

bash
# Safe stash in scripts
if ! git diff --quiet || ! git diff --cached --quiet; then
  git stash push -m "auto-stash"
  STASHED=true
fi

# ... do work ...

# Safe pop
if [ "$STASHED" = true ]; then
  git stash pop
fi

Multiple Stashes:

You can have multiple stash entries:

bash
# Apply a specific stash without removing it
git stash apply stash@{2}

# Drop a specific stash
git stash drop stash@{1}

# Create a branch from a stash
git stash branch new-branch-name stash@{0}

The index stash@{0} is always the most recent stash. Each new stash pushes older ones down the stack.

Frequently asked questions

What does "No stash entries found." mean?
The error "No stash entries found" appears when you run a git stash command that expects to operate on an existing stash, but the stash list is empty. This commonly happens with commands like git stash pop, git stash apply, git stash drop, or git stash show. Git's stash is a stack-based storage mechanism that temporarily saves uncommitted changes so you can switch branches or pull updates without committing work in progress.
How do I fix "No stash entries found."?
This Git error occurs when you attempt to apply, pop, or drop a stash but no stashes exist in your stash list. The stash may have already been applied, dropped, or was never created in the first place.
What causes "No stash entries found."?
Stash was already applied and removed by a previous 'git stash pop' command Stash list was cleared using 'git stash clear' Stash was manually dropped with 'git stash drop'
Is the "No stash entries found." error serious?
It is a low-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading