DevLabs Alliance - WhatsApp
DevLabs Alliance Logo

Home / Interview /How to Install Git ...

How to Install Git on Windows | Step-by-Step Tutorial

Admin

2024-05-07

DevLabs Alliance Interview

0 mins read

Step-By-Step Guide To Install Git on Windows


More and more developers are switching to SaaS-based version control platforms like GitHub, GitLab, and Bit Bucket as distributed version control solutions displace centralized systems like Subversion and CVS. These are all Git-based platforms, thus naturally, in order to work with them, developers must first locally install Git on Windows or Linux machines.


Here, you will learn how to install Git on Windows in this Git tutorial. Next, you must know to utilize the five fundamental Git commands that every developer should be familiar with to check if the DVCS tool was correctly installed.

Steps to Install Git on Windows


The steps to install Git on Windows are as follows:


  1. Get the Git file executable from git-scm.com/downloads.
  2. Execute the installation file as an administrator.
  3. Select a suitable installation directory, such as C: tools git.
  4. Set up the pre-installed components, such as Git GUI Here and Git Bash Here.
  5. Decide which default Git editor you prefer. We advise using Notepad++.
  6. Permit Windows PATH to be expanded to include Git
  7. To ensure compatibility between Unix and Windows, accept the default line ending conversion.
  8. Select the additional option to turn on system caching.
  9. To finish the installation, click Finish.
  10. Decide to launch a Git Bash shell and begin working with Git!

Testing To Check Validity of Git Installation


By using the five fundamental Git commands that every developer should be familiar with, you can verify the validity of your Windows Git installation.

These are the standard Git commands:


  1. init
  2. add
  3. config
  4. status
  5. commit

Create a new folder called repos off the C: drive before running Git init:


windows@install-git MINGW64 /c/repos
$ git init
Initialized empty Git repository in C:/repos/.git/


Create a new folder and place a file called windows-git-install.txt inside of it.


windows@install-git MINGW64 /c/repos
$ touch windows-git-install.txt


Then add the file to the Git index:


windows@install-git MINGW64 /c/repos
$ git add .


Configure the Git user’s email address and username:


windows@install-git MINGW64 /c/repos
$ git config --global user.name "Cameron McKenzie"
windows@install-git MINGW64 /c/repos
$ git config --global user.email "mail@example.com"


Commit the new file to the new Git repository:


windows@install-git MINGW64 /c/repos
$ git commit -m "New Windows git install commit"
[master (root-commit) 5b8f1f4] New Windows git install commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 windows-git-install.txt


And finally, check the status of the newly installed Git repo:

windows@install-git MINGW64 /c/repos
$ git status
On branch master
nothing to commit, working tree clean



The process of installing Git on Windows is now complete. Make that the DVCS tool is set up correctly to manage source code and communicate with SaaS-based platforms like GitHub, GitLab, and BitBucket.im



Final Words


If you are new to Git, you might find installing it quite intimidating. So, you will need expert guidance, but if you are not available to contact any, this step-by-step guide on how to install Git on Windows will definitely help you.

Meet The Author

DevLabs Alliance Author

Admin


HOD Neoload


DevLabs Alliance TwitterDevLabs Alliance LinkedInDevLabs Alliance Instagram

Author Bio

DevLabs Alliance conducts career transformation workshops & training in Artificial Intelligence, Machine Learning, Deep Learning, Agile, DevOps, Big Data, Blockchain, Software Test Automation, Robotics Process Automation, and other cutting-edge technologies.

INQUIRY

Want To Know More


Email is valid



Phone


By tapping continuing, you agree to our Privacy Policy and Terms & Conditions

β€œ The hands-on projects helped our team put theory into practice. Thanks to this training, we've achieved seamless collaboration, faster releases, and a more resilient infrastructure. ”
DevLabs Alliance Blogs Page Review
Vijay Saxena

SkillAhead Solutions

Lets get started today!

and get that DREAM JOB

DevLabs Alliance Footer section
DevLabs Alliance LinkedIn ProfileDevLabs Alliance Twitter ProfileDevLabs Alliance Facebook ProfileDevLabs Alliance Facebook Profile
DevLabs Alliance Logo

Gurgaon

USA

1603, Capitol Avenue, Suite 413A, 2659, Cheyenne, WY 82001, USA

DevLabs Alliance ISO 9001

DevLabs Alliance Footer SectionDevLabs Alliance Footer SectionDevLabs Alliance Footer SectionDevLabs Alliance Footer SectionDevLabs Alliance Footer SectionDevLabs Alliance Footer SectionDevLabs Alliance Footer SectionDevLabs Alliance Footer SectionDevLabs Alliance Footer Section

`Copyright Β© DevLabs Alliance. All rights Reserved`

|

Refund & Reschedule Policy

Privacy Policy

Terms of Use