git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git stash show doesn't show stashed untracked files
@ 2011-10-25 13:21 Kirill Likhodedov
  2011-10-31  8:36 ` Kirill Likhodedov
  0 siblings, 1 reply; 2+ messages in thread
From: Kirill Likhodedov @ 2011-10-25 13:21 UTC (permalink / raw
  To: git


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!"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git stash show doesn't show stashed untracked files
  2011-10-25 13:21 git stash show doesn't show stashed untracked files Kirill Likhodedov
@ 2011-10-31  8:36 ` Kirill Likhodedov
  0 siblings, 0 replies; 2+ messages in thread
From: Kirill Likhodedov @ 2011-10-31  8:36 UTC (permalink / raw
  To: git


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.
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-31  8:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 13:21 git stash show doesn't show stashed untracked files Kirill Likhodedov
2011-10-31  8:36 ` Kirill Likhodedov

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).