git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Date
Sep 17, 2017, 05:27 UTC
Message-ID
<1505626069.9625.6.camel@gmail.com>

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.

So, should this behaviour be changed?
-- 
Kaartic
Next: Junio C Hamano
Message 1 of 8 in “Behaviour of 'git stash show' when a stash has untracked files”
  1. Kaartic SivaraamSep 17, 2017
  2. Junio C HamanoSep 20, 2017
  3. Jeff KingSep 20, 2017
  4. Junio C HamanoSep 21, 2017
  5. Jeff KingSep 21, 2017
  6. Kaartic SivaraamSep 23, 2017
  7. Junio C HamanoSep 24, 2017
  8. Kaartic SivaraamSep 23, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.