fatal: Not a git repository: /Users/Mathias/Projects/punycode.js/.git/modules/vendor/docdown
I got “fatal: Not a git repository” when performing git add node_modules, which is a node module directory.
it looks like one of the modules triggers this msg:
I searched all “fatal: Not a git repository” on stackoverflow and tried the “git init” approach. It doesn’t work in my situation.
Can you help?
3 Solutions collect form web for “fatal: Not a git repository: /Users/Mathias/Projects/punycode.js/.git/modules/vendor/docdown”
If you already have a package.json file, create a .gitignore file in the root of your repo with this line in it:
There’s really no need to commit node_modules since someone else can run
npm install and get the same dependencies.
I encountered this error when trying to setup a CI process using CruiseControl.Net. I eventually found that running the following, was enough to cure the error.
npm install punycode
This allowed the build to proceed, however fell over again when Cruise Control was running “git clean -f -d -x”. This was due to the really deep network of folders installed in node_modules – file names too long for windows to cope!
For the time being, I switched of the clean with
I had the same issue.
Are you using url “0.7.9” as dependency just like me? What I had to do to get rid of this problem was just update url version to “0.10.1” in my package.json.
The issue is explained here.
Bump url dependency 0.7.9 -> 0.10.1 #10