git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Σταύρος Ντέντος" <stdedos@gmail.com>
To: git <git@vger.kernel.org>
Subject: `git stash show` "forgets" about untracked files
Date: Tue, 28 May 2019 11:52:02 +0300	[thread overview]
Message-ID: <CAHMHMxWzchXG_Ct3=n9OP=3Q-ENjt7BkGQ2iWDAE3eYhv4MpyQ@mail.gmail.com> (raw)

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.

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

                 reply	other threads:[~2019-05-28  8:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHMHMxWzchXG_Ct3=n9OP=3Q-ENjt7BkGQ2iWDAE3eYhv4MpyQ@mail.gmail.com' \
    --to=stdedos@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).