git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrille Truchot <cyrille.truchot@pird.com>
To: git@vger.kernel.org
Subject: git stash -u deletes directories containing ignored files
Date: Mon, 01 Sep 2014 16:08:49 +0200	[thread overview]
Message-ID: <54047DF1.9020800@pird.com> (raw)

Hey there,

I'm sure you've already heard about this because this is referenced on 
the web, but I cannot find anything about it on GitHub in the open 
issues nor in the fixed ones.

I'm working with Git for Windows, version 1.8.3.
The .gitignorefile contains a line like this : 'mydirectory/*'.
A new file is added in 'mydirectory' (but it's not showing with git 
status as it is ignored).
Let's say I want to stash several other files (tracked and untracked) 
and I use git stash -u.
The directory 'mydirectory' is then purely deleted, and not stashed. So, 
unrecoverable.

This happens only if thhe start is present in the .gitignore, because 
'mydirectory/' behaves normally.

So is there an open issue about this, or better, maybe it's already 
fixed in the latest versions ?
Thanks in advance for your reply, and many apologies if it's not relevant.

Someone else has described the bug here:
http://blog.icefusion.co.uk/git-stash-can-delete-ignored-files-git-stash-u/

Regards,
Cyrille

                 reply	other threads:[~2014-09-01 14:09 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

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

  git send-email \
    --in-reply-to=54047DF1.9020800@pird.com \
    --to=cyrille.truchot@pird.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.
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 NNTP newsgroup(s).