How to Install Git on Windows: A Step-by-Step Guide

Git is a DevOps tool for source code management—an open-source version control system (VCS) used to handle small to very large projects efficiently. Git is used to tracking changes in the source code, supporting non-linear development so that multiple developers can work together in near real-time.

In this blog post, you will find a step-wise guide to Git installation on Windows 10. Let’s get started.

Git Installation on Windows

1. Download the latest version of Git and choose the 64/32 bit version. After the file is downloaded, install it in the system. Once installed, select Launch the Git Bash, then click on finish. The Git Bash is now launched.

Git Installation

2. Check the Git version:

$ git --version

3. For any help, use the following command:

$ git help config

This command will lead you to a browser of config commands. Basically, the help the command provides a manual from the help page for the command just following it (here, it's config).

Another way to use the same command is as follows:

$ git config --help

4. Create a local directory using the following command:

$ mkdir test

$ cd test

5. Next step is to initialize the directory:

$ git init

6. Go to the folder where "test" is created and create a text document named "demo." Open "demo" and put any content, like "Hello Simplilearn." Save and close the file.

7. Enter the Git bash interface and type in the following command to check the status:

$ git status

8. Add the "demo" to the current directory using the following command:

$ git add demo.txt

9. Next, make a commit using the following command:

$ git commit -m "committing a text file"

10. Link the Git to a Github Account:

$ git config --global user.username

Note: simplilearn-github is the username on the Github account.

Learn the basics of Devops

Watch the beginner level video lessons for FREEGet Access Now
Learn the basics of Devops

11. Open your Github account and create a new repository with the name "test_demo" and click on "create repository." This is the remote repository. Next, copy the link of "test_demo."

12. Go back to Git bash and link the remote and local repository using the following command:

$ git remote add origin <link>

Here, <link> is the link copied in the previous step.

13. Push the local file onto the remote repository using the following command:

$ git push origin master

14. Move back to Github and click on "test_demo" and check if the local file "demo.txt" is pushed to this repository.

Summary: Steps To Install Git on Windows 10

  1. Download and install Git
  2. Git bash interface
  3. Basic Git commands
  4. Create a local repository
  5. Connect to the remote repository
  6. Push the file to GitHub

Become a DevOps Expert

Are you preparing for a career in DevOps? Check out Simplilearn's DevOps Engineer Master's Program or the DevOps Certification Training Course that bridges the gap between software developers and operations. You can become an expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration, and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet, and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.

About the Author

Sayeda Haifa PerveezSayeda Haifa Perveez

Haifa Perveez is passionate about learning new technologies and working on them. She is an engineer who loves to travel, read and write. She's always curious about things and very determined to track the latest technologies and the trends that they are creating for the future.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.