How to Install and Setup Git on Windows

Git is a fast, scalable, distributed version control system with an unusually rich command set that provides both high-level operations and full access to internals. Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers. In this tutorial, you will learn how to Install and Setup Git on Windows.

Prerequisite

User with Administrator privileges

Installing Git for Windows

Installing git is easy. You have to just the download the package and proceed to install it on your local machine.

Download Git for Windows

Open the official Git website on your favourite browser: https://git-scm.com/download/win

Click on the download link for Windows and allow the download to complete.

git for windows

Go to the download location, double-click on the downloaded file and launch the installer.

You should allow the app to make changes to your device by clicking Yes on the User Account when it prompts.

git for windows

If you want to review the GNU General Public License, then click Next.

git for windows

Installer ask you for the installation location. Leave the default, unless you got reason to change it, and click Next.

git for windows

In next dialogue box, choose the default behaviour of ‘git pull’.  We will select default and click Next.

git for windows

If you want to enable experimental support then click on check box and then click on Install.

git for windows

Now installation will begin.

git for windows

Here you go. Now Git is installed in your local windows machine.

git for windows

You can go through the release notes of latest Git version.

git for windows

Launch Git in Windows

Git has two modes of use:

  • A bash scripting shell (or command line)
  • A graphical user interface (GUI)

Launch Git GUI

You can launch Git GUI using Windows Start Menu, type Git GUI and press Enter (or click the application icon).

Launch Git Bash Shell

You can launch Git GUI using Windows Start Menu, type Git Bash and press Enter (or click the application icon).

git for windows

Setting Up Git

The easiest way of setting up Git,  is using the git config command. Specifically, you need to provide your name and email address because Git writes this information into each commit you do. When Git successfully installed, you can now move on to the Setting Up Git section of this tutorial to complete your setup.

As you have Git installed in your machine, now you need to follow few things to setting up Git.The easiest way of doing this is using the git config command. Specifically, we need to provide your name and email address because Git writes this information into each commit you do.

You can do this by following commands:

$  git config --global user.name "Your Name"
$  git config --global user.email "[email protected]"

You can verify all of the configuration items that you have set by following:

$  git config --list

#outut

user.name=Your Name
[email protected]

There is another method to check the configuration. There is .gitconfig (a hidden config file) that contains all this config information.

$  vi ~/.gitconfig

#output

[user]
name = Your Name
email = [email protected]

Once you’re done making changes in this file, you can exit vi by typing the :wq .

Conclusion

Finally, you have learned how to Install Git on Windows . Now you have Git installed in your system and ready to use.

See Also : How to Install Git from Source Code on Ubuntu 20.04

Share on:

Ravindra Kumar

Hi, This is Ravindra. I am founder of TheCodeCloud. I am AWS Certified Solutions Architect Associate & Certified in Oracle Cloud as well. I am DevOps and Data Science Enthusiast.

Recommended Reading..

2 thoughts on “How to Install and Setup Git on Windows”

Leave a Comment