git stash_error ai_generated true

error: Your local changes to the following files would be overwritten by merge (stash pop)

ID: git/stash-pop-conflict

Also available as: JSON · Markdown
90%Fix Rate
90%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
2 active

Root Cause

Stash pop conflicts with current changes. Stash is not dropped on conflict.

generic

Workarounds

  1. 92% success Resolve conflicts like a merge — edit files, mark resolved, then git stash drop
    # After resolving:
    git add <resolved-files>
    git stash drop

    Sources: https://git-scm.com/docs/git-stash#_discussion

  2. 85% success Use git stash apply instead of pop — apply doesn't auto-drop on success either way
    Use git stash apply instead of pop — apply doesn't auto-drop on success either way

    Sources: https://git-scm.com/docs/git-stash#Documentation/git-stash.txt-apply

Dead Ends

Common approaches that don't work:

  1. Force drop the stash: git stash drop 80% fail

    Loses the stashed changes — they may still be needed

  2. Reset working directory and try again 85% fail

    Loses current uncommitted work

Error Chain

Frequently confused with: