Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue. What did you do before the bug happened? (Steps to reproduce your issue) Running the following commands: ``` #!/bin/bash git init workDir cd workDir git commit -m first --allow-empty touch a git add --intent-to-add a git stash push --include-untracked ``` What did you expect to happen? (Expected behavior) I tried to stash my changes after adding a file with `git add --intent-to-add`. I expected the stash operation to succeed. What happened instead? (Actual behavior) The stash operation fails with the following output: ``` error: Entry 'a' not uptodate. Cannot merge. Cannot save the current worktree state ``` Also, I find the error message very confusing. It seems inconsistent whether git considers files added with `--intent-to-add` as tracked or untracked. Running `git status` after the commands above will show "Changes not staged for commit: new file: a". If I run the following commands after the commands above: ``` touch b git add b git stash push -S git stash pop --index git rm -f b ``` `git status` will now report the file `a` as untracked. What's different between what you expected and what actually happened? I expected `git stash push` to succeed instead of failing. Anything else you want to add: I tested this on git 2.35.1 and 2.21.0, which are both affected. [System Info] git version: git version 2.35.1 cpu: x86_64 built from commit: 4c53a8c20f8984adb226293a3ffd7b88c3f4ac1a sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 compiler info: gnuc: 10.2 libc info: glibc: 2.31 $SHELL (typically, interactive shell): <unset> [Enabled Hooks] not run from a git repository - no hooks to show