I had a problem, when I run git stash -u (i.e. all files, including unplayable files), Git deletes my node_modules directory. Also, it doesn't even restore it to git stash pop - I need to run npm install again to get it back.
node_modules is ignored in .gitignore (via the node_modules/* ), and as far as I can see, it has never been executed in the project history ( git log --all -- node_modules nothing). Shouldn't git stash ignore it (even when committing unprepared files)? I am pretty sure I used git stash like this before without any problems with node_modules.
Update: I checked, and this problem is not limited to a specific project - it seems to happen anywhere I run git stash -u . For what it's worth, my version of Git is 2.6.3.windows.1 (on Windows).
source share