# git stash show doesn't show stashed untracked files

2 messages from 2011-10-25 to 2011-10-31. Participants: Kirill Likhodedov.
Thread: https://gitlist.dev/t/28762

## Kirill Likhodedov, 2011-10-25 13:21

Subject: git stash show doesn't show stashed untracked files
Message-ID: <5284251B-7265-493B-981D-DD10B80F85B1@jetbrains.com>
URL: https://gitlist.dev/e/5284251B-7265-493B-981D-DD10B80F85B1%40jetbrains.com

```

Git 1.7.7 introduced a very useful feature - stashing untracked files via "-u" option.

However, there is a problems with it:
'git stash show' doesn't show stashed untracked files.

# git version
git version 1.7.7
# touch untracked.txt
# git stash save -u
# git stash show         // no output

If changes in tracked files are stashed along with untracked files, then only tracked changes are shown in "git stash show" output.

Moreover, if I have the same file in the working tree, I wouldn't be able to 'git stash pop':
# git stash pop -v
untracked.txt already exists, no checkout
Could not restore untracked files from stash

In this case the only way to access the stashed content is to remove the tracked file and pop the stash again.

----------------------------------
Kirill Likhodedov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

```

## Kirill Likhodedov, 2011-10-31 08:36

Subject: Re: git stash show doesn't show stashed untracked files
Message-ID: <503C659A-47BA-4DEA-8EA8-D2B46C2BBF59@gmail.com>
URL: https://gitlist.dev/e/503C659A-47BA-4DEA-8EA8-D2B46C2BBF59%40gmail.com
In-Reply-To: <5284251B-7265-493B-981D-DD10B80F85B1@jetbrains.com>

```

Resending: it seems that the message was lost in discussions.

> 
> Git 1.7.7 introduced a very useful feature - stashing untracked files via "-u" option.
> 
> However, there is a problems with it:
> 'git stash show' doesn't show stashed untracked files.
> 
> # git version
> git version 1.7.7
> # touch untracked.txt
> # git stash save -u
> # git stash show         // no output
> 
> If changes in tracked files are stashed along with untracked files, then only tracked changes are shown in "git stash show" output.
> 
> Moreover, if I have the same file in the working tree, I wouldn't be able to 'git stash pop':
> # git stash pop -v
> untracked.txt already exists, no checkout
> Could not restore untracked files from stash
> 
> In this case the only way to access the stashed content is to remove the tracked file and pop the stash again.
> 

```
