Skip to main content
Lesson 3 · GitHub track 3 min readBeginner🪟 Windows

Setup your Git on Windows

GitHub provides two ways of installation: GitHub Desktop, and the command line by installing the Git software on your system. Personally, from a developer perspective, I would suggest you use the command line, as it comes in handy and gives more flexibility in solving bugs and doing more with version control, especially when conflicts happen with Git. This tutorial is focused on the command line version.

GitHub DesktopPoint and click app
RecommendedCommand line (Git)This tutorial
You are here18 lessons in the GitHub track

Your install checklist

Tick each step as you finish it.
0 of 5 done

Step 1: Let’s download Git​

Go to the Git Website and click on the Download for Windows button.

https://git-scm.com/

git-scm.com home page with the Download for Windows button

IN THE SCREENSHOT
  • Marker 11: Install: Download for Windows

Step 2: Select the version you want to install​

Get your installer: Based on your version of Windows, you can choose the standalone installer or the Windows installer to get started. As my system is 64-bit, I will choose 64-bit here. You can find out which system you are using by right-clicking the This PC icon, choosing Properties and checking the System type.

WHICH INSTALLER DO I NEED?Check it on your PC, then pick it here
  • 🖥️ This PC
  • → right click
  • Properties
  • → look for
  • System type
⬇️ Git for Windows/x64 Setupunder Standalone Installer on the download page

Installer: Get the Installer

https://git-scm.com/downloads/win

Git for Windows download page with the x64 standalone installer link

IN THE SCREENSHOT
  • Marker 12: This one: Git for Windows/x64 Setup

Start Installation: Open the installer once it has downloaded.

https://git-scm.com/

Git setup wizard showing the GNU General Public License screen

IN THE SCREENSHOT
  • Marker 13: Click on Next
  1. On the next screen, click Next on the Public Licence.
  2. Choose the default location and click Next.

Step 3: Understanding the Interface​

Next, Git will ask you to install a couple of components. You can check Additional icons to add them on the Desktop, leave the rest as default and click Next.

  1. On the next screen, click Next, and make sure the Start Menu folder name is Git.
  2. Next, choose the default editor. You can use your own editor (I am using Visual Studio Code) or keep Vim as the default editor.
https://git-scm.com/

Git setup Select Components screen with Additional icons checked

IN THE SCREENSHOT
  • Marker 14: Additional icons, if required

Step 4: Adjusting the name of the repo setting in Git​

At this stage, it will ask you to choose the initial branch name for new repositories. The ideal approach is to pick the second option, as it gives us the flexibility to change the initial branch name, like main, master or trunk.

https://git-scm.com/

Git setup screen to override the default branch name, with main typed in

IN THE SCREENSHOT
  • Marker 14: Give main

Step 5: Adjusting your PATH environment​

This is where we specify the PATH environment for Git. Just go with the recommended option, which is option 2.

https://git-scm.com/

Git setup Adjusting your PATH environment screen with the recommended option selected

IN THE SCREENSHOT
  • Marker 15: Select path: Git from the command line and also from 3rd-party software
THE NEXT 7 INSTALLER SCREENSScreen 1 of 7
Choosing the SSH executable
Recommended option: Use bundled OpenSSH.
Simplified view of each installer screen. Option names follow the Git for Windows installer and may be worded slightly differently in your version.
https://git-scm.com/

Completing the Git Setup Wizard with Launch Git Bash and Finish highlighted

IN THE SCREENSHOT
  • Launch Git Bash
  • Finish
Congratulations

Congratulations! The Git setup is finished and you can now launch Git Bash.

After setup, you will see a few new apps in your PC’s application list: Git Bash, Git GUI and Git CMD. However, we will mostly use Git Bash for uploading our projects.

  • We use thisGit BashCommand line, used most in this course
  • Git GUIGraphical interface
  • Git CMDGit in the Windows command prompt

Check your Git version​

Run the command below in Git CMD or the Windows Command Prompt to see your current version of Git. Git installation on Windows is complete.

Check your Git version
git --version

Conclusion​

In conclusion, I hope you enjoyed reading this article on “Setting up your Git environment”. In the next post, we will discuss using Git to create a repository and clone a project from GitHub.

Signing off, Sanjay Viswanathan.

UP NEXT · LESSON 4Setup Git on Mac
Share this page

MAINTAINED BY

Sanjay Viswanathan

@sanjay-kv

Founder of recodehive and Technical program manager, Prev Google ML Facilitator & Ex- GitHub CE who delivered 100+ talks on ML and open source and developer advocacy.

Was this helpful?

Your vote helps us improve our docs.

Improve this page

All our docs are open source. Found a typo, want to add detail or have a better explanation? Anyone can contribute.

Comments

Powered by GitHub Discussions