In git bash I ignored the node_modules folder, with this command:
git config --global core.excludesfile ~/.gitignore
then use command git status
and git add .
both not work
and get this message:
warning: unable to access 'node_modules': Permission denied
fatal: cannot use node_modules as an exclude file
Is there any way to un-ignore the ignored folder? What I tried:
Remove the current node_modules folder, and create and new one and paste in same content. Then
git status
still gets the same message.Command
rm -rf .git
then re-create git repogit init
still get the fatal message.Command
rm -rf .gitignore
. still get the fatal message.
=== update
I found an answer here that removes the error message.
And for people who are new to it like me, an article explaining how to use gitignore Ignoring files