1

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:

  1. Remove the current node_modules folder, and create and new one and paste in same content. Then git status still gets the same message.

  2. Command rm -rf .git then re-create git repo git init still get the fatal message.

  3. 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

Robin
  • 1,487
  • 4
  • 17
  • 29

0 Answers0