git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* `git stash show` "forgets" about untracked files
@ 2019-05-28  8:52 Σταύρος Ντέντος
  0 siblings, 0 replies; only message in thread
From: Σταύρος Ντέντος @ 2019-05-28  8:52 UTC (permalink / raw)
  To: git

Hello there,

I have saved some new untraced files, along with some tracked files in
a stash, in order to start making small commits.
However, it seems that doing `git stash show`, will leave no trace
about untracked files being bundled inside.

For example:

#                                 tracked -- untracked
user@host:repo/folder$ git stash push -u file.ctrl file1.ctrl
file2.ctrl file3.ctrl file4.ctrl -m 'New feature with untrackeds'
Saved working directory and index state WIP on feature/auth_saml:
03cd4d56538 fixup! drop! squash! NGFW-16257 QA: Configure Identity
Provider with Ansible with asd2
fatal: pathspec 'folder/-m' did not match any files  #[1]
error: unrecognized input
user@host:repo/folder$ git stash show
 file.ctrl | 4 ++++
 1 file changed, 4 insertions(+)
user@host:repo/folder$ git stash pop
file1.ctrl already exists, no checkout
file2.ctrl already exists, no checkout
file3.ctrl already exists, no checkout
file4.ctrl already exists, no checkout
Could not restore untracked files from stash entry
$  git --version
git version 2.21.0

---------------------------------------

I understand that I could probably have staged them, and then commit maybe?
I didn't want that at the time though

---------------------------------------

[1]: This also seems to be a bug.
I understand I wrote it wrong, but, since I haven't used `--`, I am
not sure if `git` has the right to assume that `-m` is a filename.
However, the command has finished correctly.

Ντέντος Σταύρος

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-28  8:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28  8:52 `git stash show` "forgets" about untracked files Σταύρος Ντέντος

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