How to install Git on Windows 10? Git installation in Windows tutorial.

Maksym Rudnyi
7 min readMar 13, 2023

--

Git is an open-source version control system that is used by developers to track changes in code and collaborate on software projects. It is a powerful tool that can be used on any operating system, including Windows 10. If you are new to Git and want to install it on your Windows 10 machine, then this step-by-step guide is for you.

Video Tutorial of Git installation on Windows 10.

Step 1: Download Git for Windows

The first step to installing Git on your Windows 10 machine is to download it from the official website. Go to the Git website (https://git-scm.com/download/win) and click on the “Download for Windows” button. This will download the latest version of Git for Windows to your machine.

Step 2: Run the Git Setup Wizard

Once the Git for Windows installer has been downloaded, run the setup wizard. You can do this by double-clicking on the downloaded file. The setup wizard will guide you through the installation process.

Step 3: Choose the Installation Destination

During the installation process, you will be asked to choose the destination folder where Git will be installed. The default location is usually fine, but you can choose a different location if you prefer.

Step 4: Select Components to Install

The next step is to select the components that you want to install. You can choose to install the Git Bash Shell, Git GUI, and Git Credential Manager. Install all of these components.

Step 5: Select Start Menu Folder

Just click Next and keep it as default

Step 6: Choose the Default Editor

Git requires an editor to be used when committing changes. During the installation process, you will be asked to choose a default editor. The default editor is usually Vim, but you can choose a different editor if you prefer.

Step 7: Choose the Default Branch Name

Git uses a default branch name when creating a new repository. During the installation process, you will be asked to choose a default branch name. The default branch name is usually “master,” but you can choose a different name if you prefer.

The default branch name for Git has been a topic of discussion and debate in recent years. Traditionally, the default branch name for Git has been “master,” but there has been a movement in the community to change the default branch name to “main” to remove any racial or sexist connotations associated with the term “master.”

The Git project itself has changed the default branch name from “master” to “main” in its own repositories, and many other projects and organizations have followed suit. However, there is no official recommendation or requirement for using either “main” or “master” as the default branch name in Git. Ultimately, it is up to the individual or organization to decide which branch name they prefer to use.

If you are starting a new Git repository, it is worth considering using “main” as the default branch name to support inclusivity and diversity in the tech community. However, if you are working on an existing project that uses “master” as the default branch name, it may be more practical to continue using that name to maintain consistency and avoid confusion.

Step 8: Configure the Environment Variables

The last step of the installation process is to configure the environment variables. Git needs to be added to the PATH variable so that it can be used from the command line. You can choose to add Git to the PATH variable for all users or just for the current user. We recommend that you add Git to the PATH variable for all users.

Step 9: Choosing the SSH executable

Which SSH client do you want Git to use? Git already comes with its own SSH client, so if you don’t need a specific one, leave the default option and click Next.

Step 10: Choosing HTTPS transport backend

The next option relates to server certificates. Most users should use the default. If you’re working in an Active Directory environment, you may need to switch to Windows Store certificates.

Step 11: Configuring the line ending conversations

Configuring the line ending conversations in Git refers to the process of setting up how Git should handle line endings when working with files. Line endings are the characters that are used to separate lines of text in a file, and they can differ between operating systems.

For example, Windows uses a combination of two characters, “carriage return” and “line feed” (CRLF), to represent a line break, while Unix-based systems such as Linux and macOS use just a single “line feed” (LF) character. This can cause issues when collaborating on files between different operating systems, as line endings can become inconsistent and cause errors.

Git provides a way to manage these line endings through its configuration settings. You can configure Git to automatically convert line endings to the appropriate format for your operating system when files are checked in or out of a repository. This ensures that line endings are consistent across all contributors to the project, regardless of their operating system.

Just select the first option.

Step 12: Configuring the terminal emulator to use with Git Bush

When using Git Bash on Windows, it is important to configure the terminal emulator to use with Git Bash to ensure a better user experience. A terminal emulator is a program that provides a graphical interface for users to interact with the command line. Git Bash uses the MinTTY terminal emulator by default, which provides a Unix-like terminal environment on Windows.

By configuring the terminal emulator to use with Git Bash, you can customize the user experience to better fit your preferences and needs. For example, some users may prefer to use a different terminal emulator for improved performance or additional features. Configuring the terminal emulator also allows you to set preferences for the appearance of the terminal, such as font size and color scheme, to make it more comfortable to use.

Step 13: Choose the default behavior of `git pull`

For beginners, it is recommended to stick with the default behavior of git pull unless there are specific reasons to do otherwise. This will simplify the process of integrating changes from the remote repository and ensure a linear commit history that is easier to understand. However, it is important to be aware of potential conflicts and how to resolve them in case they occur.

Step 14: Verify the Git Installation

Once the installation process is complete, you can verify that Git has been installed correctly by opening the command prompt and typing “git — version”. This should display the version of Git that has been installed on your machine.

Congratulations! You have successfully installed Git on your Windows 10 machine.

Best Practices

Here are some best practices that you should follow when using Git on Windows 10:

  1. Use Git Bash — Git Bash is a Unix-like shell that provides a command-line interface for Git on Windows. It is a better alternative to the standard Windows command prompt.
  2. Configure Git — You should configure Git with your name and email address so that your commits are attributed to you.
  3. Use a Git GUI — If you are new to Git, then using a Git GUI can make it easier to understand how Git works.
  4. Use Git with a Code Editor — Most code editors have built-in support for Git. This makes it easier to commit changes and manage repositories directly from your code editor.

Conclusion

Git is an essential tool for developers who want to track changes in code and collaborate on software projects. By following this step-by-step guide, you can install Git on your Windows 10 machine and start using it to manage your repositories. Remember to follow the best practices outlined in this post to get the most out of Git on Windows 10.

** I recently created “Medium Stats” — FREE Chrome extension Medium Writers to explore their earnings easily.

If you enjoyed ❤️ it and want me to add more functionality, there is a small option to ☕ ☕☕buy coffee for me.

--

--