Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm install with .git folder #9075

Closed
ghost opened this issue Jul 27, 2015 · 1 comment
Closed

npm install with .git folder #9075

ghost opened this issue Jul 27, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 27, 2015

Hi, I'm using npm@3.2.0. I`m using npm install command to download my private repository. And the download result will generate two folders: npm-modules and npm-xxxxx-xxxxxx.

I found that npm-modules would not exist .git folder, however, .git folder exists in npm-xxxxx-xxxxxx. Is there any config or option I can do that the .git folder will exists in npm-modules?

@othiym23
Copy link
Contributor

The version of packages published to the registry doesn't include the .git folder by design. It's not really meant to be used for development – you should be cloning the repository from wherever it's hosted if you want to change it. Because npm drives all installs through the npm cache, and what's in the cache is (ultimately) packages, they need to all look roughly the same as what's published to the registry, which is why the cached version of a git-hosted package also has no .git in it. If you want to be working on packages while they're installed in your project, take a look at using npm link or using local dependencies. Good luck!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant