Git vs npm: What are the differences?
Git can be classified as a tool in the "Version Control System" category, while npm is grouped under "Front End Package Manager".
Git and npm are both open source tools. Git with 28.2K GitHub stars and 16.3K forks on GitHub appears to be more popular than npm with 17.2K GitHub stars and 3.17K GitHub forks.
Netflix, reddit, and Lyft are some of the popular companies that use Git, whereas npm is used by reddit, Instacart, and Coursera. Git has a broader approval, being mentioned in 3932 company stacks & 4778 developers stacks; compared to npm, which is listed in 2642 company stacks and 2666 developer stacks.
What is Git?
What is npm?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to add, upvote and see more consMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
I use Git instead of SVN (Subversion) because it allows us to scale our development team. At any given time, the Zulip open source project has hundreds of open pull requests from tens of contributors, each in various stages of the pipeline. Git's workflow makes it very easy to context switch between different feature branches.
I've been excited about Git ever since it got a built-in UI. It's the perfect combination of a really solid, simple data model, which allows an experienced user to predict precisely what a Git subcommand will do, often without needing to read the documentation (see the slides linked from the attached article for details). Most important to me as the lead developer of a large open source project (Zulip) is that it makes it possible to build a really clean, clear development history that I regularly use to understand details of our code history that are critical to making correct changes.
And it performs really, really well. In 2014, I managed Dropbox's migration from Mercurial to Git. And just switching tools made just about every common operation (
git commit etc.) 2-10x faster than with Mercurial. It makes sense if you think about it, since Git was designed to perform well with Linux, one of the largest open source projects out there, but it was still a huge productivity increase that we got basically for free.
If you're learning Git, I highly recommend reading the other sections of Zulip's Git Guide; we get a lot of positive feedback from developers on it being a useful resource even for their projects unrelated to Zulip.
But one also deals with broken third-party dependencies uploaded to npm way too often (even ignoring the malicious packages issues that have gotten a lot of press of late). And one mostly has to use nvm in order to pin a specific version of node itself in a maintainable way, and nvm is a mess.