threads / discuss / 46765

Behaviour of 'git stash show' when a stash has untracked files

Subject: Behaviour of 'git stash show' when a stash has untracked files

## tl;dr

One message between Sep 17, 2017 and Sep 17, 2017.

replies: 0people: 1as markdown or json

Kaartic Sivaraam· Sep 17, 2017, 05:07 UTC · lore

Some time ago, I stashed a few changes along with untracked files. I almost forgot it until recently. Then I wanted to see what I change I had in the stash. So I did a 'git stash show <num>'. It worked fine but didn't say anything about the untracked files in that stash. That made me wonder where the untracked files I added went. I then applied the stash to see that they were still there but weren't listed in show.

I understand that they aren't listed because 'git stash show' is typically a "diff between the stashed state and its original parent" as the documentation says but shouldn't there be at least a message that the stash contains untracked files. Those untracked files are "part of the stash" and I see no way to get information about their presence currently.

-- 
Kaartic

← back to recent threads