DEV Community

Cover image for Git For Windows: Step-by-Step Instructions for Setting Up Git in 12 Easy Steps
Eleazu Osita Ibe
Eleazu Osita Ibe

Posted on

Git For Windows: Step-by-Step Instructions for Setting Up Git in 12 Easy Steps

INTRODUCTION:

In the version control ecosystem, Git is a powerhouse.

Over 100 million users such as – designers, IT specialists and software engineers actively utilize Git as their primary tool for performing a wide range of tasks, including:

  • Tracking project history and revisions.

  • Collaboration among team members.

  • Facilitating code documentation and sharing.

Despite Git’s impressive capabilities, the installation process can be challenging, particularly for beginners. This article presents a clear and concise 12-step guide for setting up Git on a Windows machine.

To ensure clarity and accessibility for beginners, this article is designed with a user-friendly language and each instruction is complemented by visual aid. This way, users can seamlessly follow along in real time.

This installation guide is strictly for users on a Windows machine. As such, it does not cover the installation process for either MacOS or Ubuntu. On MacOS and Ubuntu, package managers like Homebrew and apt are often utilized to install software, including Git, conveniently from the command line. However, as Windows does not come with a built-in package manager, this article focuses on guiding Windows users through the specific installation steps.

PREREQUISITES:

To get the best out of this guide, you should have a basic understanding of the following concepts:

  • General computer literacy, including basic file management and familiarity with using a command prompt or terminal.

  • Downloading and installing software.

  • Basic knowledge of Version Control Systems.

Additionally, you will find it beneficial to have ready access to a code editor, as Git is commonly used in conjunction with code editors. And at some point in the installation process, you’ll also be prompted to select your preferred code editor from a list of options.

If you do not already have a code editor or wish to explore other options, check out the following links for information about some of the most popular code editors:

Now that we’ve taken care of that, let’s have Git set up!

Installing Git: Get Started

To get started with the installation process, first, verify if Git is already installed on your machine. Simply run the following command on your command prompt or terminal:

  • git --version

If the output displays a version number greater than 2.20, it indicates that Git is already installed on your machine, and you can use that version. However, if you receive an error or the output shows a version number less than 2.20, no worries! You can continue with this guide as it covers the installation of the latest version of Git.

Installation Process: 12 Easy Steps

STEP 1: DOWNLOAD THE LATEST VERSION OF GIT

Visit www.gitforwindows.org and download the latest Git software package, which comes bundled with a range of useful tools, including a Bash emulation environment to run Git commands seamlessly.

Git for Windows official website's landing page

STEP 2: ACCEPT THE GNU GENERAL PUBLIC LICENSE (GPL)

After downloading and running the software, the first window you encounter will display the software license. Git follows the GPL version 2 license, which is a free software license. Click “Next” to continue with the setup.

Git's GNU GENERAL PUBLIC LICENSE (GPL) window

STEP 3: SELECT THE INSTALLATION PATH

This window shows the installation path for Git, indicating where the software will be located. Keep the default path unchanged, and click “Next” to proceed with the installation.

Git's installation path window

STEP 4: CUSTOMIZE YOUR GIT INSTALLATION

In this window, you can customize your Git installation by selecting additional components. By default, Git integrates with Windows Explorer, enabling you to run Git commands or the Git Graphical Interface in the current folder.

Select the checked options displayed in the figure below. After this, click “Next” to continue with the installation.

Customize installation options window

STEP 5: CHOOSE SHORT-CUT FOLDER NAME

In this window, you can select a name for the folder where the installation shortcuts will be stored. For simplicity, it's recommended to keep the default name as “Git”. Click “Next” to proceed with the installation.

window to choose Git's short-cut folder name

STEP 6: CHOOSE YOUR PREFERRED CODE EDITOR

This window gives you the option to select a code editor that suits your preferences. It's essential to pick an editor you are comfortable with. Simply pick your preferred editor from the drop-down menu, and then click “Next” to proceed with the installation.

window to select preferred code editor

STEP 7: ADJUST YOUR PATH ENVIRONMENT

In this window, you have the freedom to adjust your PATH Environment according to your preferences for executing Git from the command line.

Choose the second option, which is the recommended one. This option offers flexibility, allowing you to utilize Git not only from Git Bash, the command line, and Windows PowerShell but also from any third-party software searching for Git in PATH. Click “Next” to proceed with the installation.

window to adjust path environment

STEP 8: CHOOSE SSL VALIDATION OPTION

In this window, you can choose the method for validating the Secure Socket Layer (SSL) used in HTTPS connections. As you’ll primarily be using Git to interact with Github, Keep the default option selected and click “NEXT” to proceed with the installation.

window to select Git's SSL validation option

STEP 9: LINE ENDINGS CONFIGURATION

This window allows you to tailor how line endings are managed in your Git environment. Line endings, which indicate the end of a line in text files, vary between Windows, Linux, and MacOS systems.

By default, Git stores line endings in local files as UNIX line endings. This choice proves valuable when collaborating with users on diverse operating systems while using Windows. Keep the default option selected. Click “Next” to proceed with the installation.

window to configure line ednings

STEP 10: CONFIGURE TERMINAL EMULATOR TO USE WITH GIT BASH

In this window, you can configure the terminal emulator for Git. The terminal emulator offers a user-friendly graphical interface to interact with your operating system through commands.

Keep the default option selected and click “NEXT” to continue with the installation.

window to configure Git's terminal emulator

STEP 11: CONFIGURE EXTRA OPTIONS

This window allows you to enable certain features in Git, like file system caching and Git credential manager.

File system caching speeds up Git operations, making Git run faster when committing and checking out changes. Git credential manager securely stores and manages your Git credentials, so you don't need to repeatedly enter your name and password when working with remote repositories.

Keep the default options as is:

  • Enable file system caching

  • Enable Git credential manager

Click “NEXT” to proceed with the installation.

window to enable extra configuration options

STEP 12: CONFIGURE EXPERIMENTAL OPTIONS

In this last window, you have the opportunity to configure experimental options, which provide access to new and innovative features currently still being tested and improved by the Git community.

To ensure a smooth installation, keep the default options as is. Click “install” to complete the installation.

window to configure experimental options

Congratulations! Git is now installed on your system, ready for version control and effortless project management. Happy coding!

Top comments (0)