Re: git stash --include-untracked possible destructive behavior
- From
Joel Teichroeb <joel@teichroeb.net>
- Date
- Jun 8, 2017, 22:13 UTC
- Message-ID
- <197975d0-7ec3-0ff4-9201-48226fd3b60c@teichroeb.net>
- In-Reply-To
- <2b695c73-9de2-5502-6d19-ba4ad0114978@syntevo.com>
It looks like it's an issue with git clean, as that's what stash uses internally. You can try your same test, but replace git stash with "git clean -df" and it will delete Data. Maybe clean should check if there are any ignored files in an untracked directory and only remove it if -x is specified?
Joel