Ray's Knowledge Base
Unlock

git stash create refuses a tree that has an intent-to-add entry

PitfallVerified 29 Sep 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

git stash create fails or refuses to snapshot a tree that contains a file added with git add -N (intent-to-add).

Cause#

git stash create cannot handle intent-to-add index entries; the tree it would write is incomplete for such entries.

Fix#

Stage the new file fully with git add <file> first, then run git stash create to snapshot the tree.

Evidence#

2026-09-30 session: git stash create refused a tree with an intent-to-add entry until the new file was fully staged with git add.

Also found by searching

  • git add -N newfile.rs; git stash create -> error: Entry 'newfile.rs' not uptodate. Cannot merge.
  • snapshotting my working tree with git stash create fails when there is an intent-to-add file
  • how do I create a stash commit when a new file was added with git add -N?
  • git stash create refuses intent-to-add index entry, ita file breaks write-tree snapshot
  • git stash create refuses to snapshot tree with git add -N file
  • git stash create error with intent-to-add entry, returns empty or fails
  • how do I snapshot working tree including a new untracked file with git stash create?
  • git add --intent-to-add breaks stash create, what to do first