0

I have modified some node modules and I want to add them to git but they never get added. My app is running in IntelliJ on a MacBook. I tried all the solutions at:

Recursively add the entire folder to a repository

to no avail. I have no .gitignore file. What is preventing these files from being added? I can even open up a file, make a minor change and save it. Yet Git still does not recognize any changes.

Nimeshka Srimal
  • 8,012
  • 5
  • 42
  • 57
Johann
  • 27,536
  • 39
  • 165
  • 279
  • Are you sure they are not being ignored? Do they show up if you run `git status` ? Usually node modules are set to ignore. – Nimeshka Srimal Aug 07 '18 at 14:53
  • git status shows them as new files (everything is green) but when I go to do a commit, nothing gets added. – Johann Aug 07 '18 at 14:55
  • Can you tell how you add them? and can you provide a screenshot? – Nimeshka Srimal Aug 07 '18 at 14:57
  • git add some_node_module/. -f – Johann Aug 07 '18 at 14:58
  • Please add a screenshot for git status, and also, if you don't have a .gitignore file, the other location which could possibly add an ignore rule is in `.git/info/exclude` please add that file too. – Nimeshka Srimal Aug 07 '18 at 15:00
  • There appears to be a bug in IntelliJ using the Git menu commands there. I executed the commit command in a terminal instead and this did work. Seems like IntelliJ deliberately prevents committing node files and doesn't even report when they have changed. – Johann Aug 07 '18 at 15:09
  • Alright, then I guess it's solved. :) – Nimeshka Srimal Aug 07 '18 at 15:10

0 Answers0