`git stash show` "forgets" about untracked files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux