I have node_modules
and bower_components
in .gitignore. Every time I switch branches, all the dependencies get removed (with exception to the globally installed ones) and I have to reinstall all of them.
I'm currently using git stash save --keep-index --include-untracked —all
, but I was wondering if there's a simpler solution where it would retain the the directories in .gitignore after switching back from another branch.