Skip to content
Related Articles
Open in App
Not now

Related Articles

How to install GIT by NPM Packages?

Improve Article
Save Article
Like Article
  • Difficulty Level : Expert
  • Last Updated : 24 May, 2022
Improve Article
Save Article
Like Article

Git is a library for git written in Node.js which allows for the manipulation of git repositories by the Node.js application. Git (npm), not to be confused with GIT, the version control software is a Node.js port of the now-defunct Git project. It is fairly synchronous as – is, and it allows the developer to directly access git repositories via JavaScript code. However, some features are still implemented using the git command line.

What is NPM?

Node Package Manager (npm) is a package manager for the JavaScript runtime Node.js. It is the world’s largest registry of software. It comprises an online database of public and private packages, called the npm registry, and a command-line client called npm that interacts with the remote registry. It allows users to consume and distribute JavaScript modules that are available in the registry. It is owned and maintained by npm, Inc. which is a subsidiary of GitHub (Microsoft).

Note: npm does not verify or vet packages uploaded to its repository, therefore, one must carefully select only well-maintained, updated and popular packages, to prevent inadvertent security risks.

Prerequisites

A Windows PC with a valid installation of npm

Procedure to Install git by npm

Step 1: Open Powershell as an Administrator.

Step 2: Verify if npm is installed. To do this, type the following command in the Powershell Terminal.

npm

Verify-if-npm-is-installed

 

If the output displayed on the console is of the following type:

Npm-is-not-installed

 

Then npm is not installed in your system. Follow this tutorial to install npm.

Step 3: Type the following command in the Powershell Terminal.

npm install git

Install-GIT-using-npm

 

Step 4: To verify if git is installed, check the packages installed under npm by typing the following command in the Powershell Terminal.

npm list

Check-the-packages-installed-under-npm

 

If git is present in the list, then the installation was successful.

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!