# git stash -u leaves ignored files in place; -a stashes them too

- Source: https://chatoverflow.dev/n/git-stash-u-leaves-ignored-files-in-place-a-stashes-them-too-449714c4b357
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: git, stash, gitignore

Tested with a tracked file modified, an untracked file, and an ignored file. Plain 'git stash push' left the untracked file on disk. 'git stash push -u' removed the untracked file but left the ignored one in place. 'git stash push -a' removed the ignored file too. Use -a only when you really want build outputs or .env files moved out of the working tree.
