What Git is and why you need it on Windows
Git is version control software that tracks changes to your code files and lets you work with other developers without overwriting each other's work. If you write code on Windows, Git lets you save snapshots of your project, switch between different versions, and merge changes from multiple people into one codebase.
Windows does not come with Git built in, so you need to download and install it separately. The most straightforward way is to use Git for Windows, which is the official Windows version maintained by the Git community. Once installed, you can use Git through the command line (Command Prompt or PowerShell) or through a graphical interface if you prefer not to type commands.
Key Takeaways
- Download Git for Windows from git-scm.com, which is the official source and the version most Windows developers use.
- Run the installer and accept the default settings on most screens unless you have a specific reason to change them.
- After installation, open Command Prompt or PowerShell and type git --version to confirm Git is working.
- Before you make your first commit, configure your name and email address using git config commands so Git knows who made each change.
- You can use Git from the command line immediately, or install a graphical tool like GitHub Desktop if you prefer clicking buttons instead of typing commands.
Download Git for Windows from the official source
Go to git-scm.com in your web browser. You will see a large blue button that says "Download for Windows". Click it. The site detects that you are on Windows and offers you the right version automatically.
The download is about 50 megabytes and takes a minute or two on a normal internet connection. Save the file to your Downloads folder or anywhere you can find it. The file name will be something like Git-2.x.x-64-bit.exe (the numbers change as Git updates).
Do not download Git from any other website. Copies hosted elsewhere may be outdated or modified. The official git-scm.com is the only source you need.
Run the installer and choose your settings
Open your Downloads folder, find the Git installer file, and double-click it. Windows will ask if you want to allow this program to make changes to your device — click Yes. The installer window opens.
The installer shows you a series of screens with options. On most of them, the default choice (the one already selected) is the right one for a new user. Here is what each screen does and what to do:
- License: Read it or skip it, then click Next.
- Installation location: Leave it as C:\Program Files\Git and click Next.
- Components: Leave all boxes checked and click Next. This installs Git Bash (a command-line tool) and other tools you may need later.
- Start Menu folder: Leave it as Git and click Next.
- Default editor: The dropdown shows Vim by default. If you do not know Vim, change this to Nano (easier for beginners) or Notepad (what you already know). Click Next.
- Initial branch name: Leave it as master and click Next. (Some projects use main instead, but you can change this per project later.)
- PATH environment: Select Git from the command line and also from 3rd-party software and click Next. This lets you type git commands in Command Prompt or PowerShell.
- HTTPS transport backend: Leave it as Use the native Windows Secure Channel library and click Next.
- Line ending conversions: Select Checkout Windows-style, commit Unix-style line endings and click Next. This prevents line-ending conflicts when you work with people on Mac or Linux.
- Terminal emulator: Select Use Windows' default console window and click Next.
- Git pull behavior: Leave it as Default (fast-forward or merge) and click Next.
- Credential helper: Leave it as Git Credential Manager and click Next. This saves your login information so you do not type it every time.
- Extra options: Leave all boxes unchecked and click Next.
- Experimental options: Leave all boxes unchecked and click Install.
The installer copies files to your computer. This takes a minute or two. When it finishes, click Finish.
Verify Git is installed and working
Open Command Prompt or PowerShell. On Windows 10 or 11, press the Windows key, type cmd or powershell, and press Enter. A black or blue window opens.
Type this command and press Enter:
git --version
If Git installed correctly, you will see output like git version 2.42.0.windows.1 (the number may be different). If you see an error like "git is not recognized", the installer did not complete properly — restart your computer and try again, or reinstall Git.
Configure your name and email before your first commit
Git records who made each change to a file. Before you create your first snapshot (called a commit), you need to tell Git your name and email address. These do not have to match your Windows login or your email provider — they are just labels Git uses to mark your changes.
In the same Command Prompt or PowerShell window, type these two commands, pressing Enter after each one. Replace the text in quotes with your actual name and email:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
The --global flag means these settings apply to every Git project on your computer. If you want different settings for a specific project, you can run the same commands without --global from inside that project's folder.
To check that your settings were saved, type:
git config --global user.name
Git will print back the name you entered. Do the same with user.email to confirm.
Choose how you want to use Git
You can now use Git from the command line by typing commands in Command Prompt or PowerShell. This is how most developers work, and it is the most powerful way to use Git. If you want to learn the commands, there are many tutorials online.
If you prefer a graphical interface where you click buttons instead of typing, you have options. GitHub Desktop is free and designed for beginners — it handles the most common Git tasks through a visual interface. You can download it from desktop.github.com. Other graphical tools include Sourcetree, TortoiseGit, and GitKraken, though these are more complex.
You do not need a graphical tool to use Git. Command line is perfectly fine, and many developers prefer it. Start with the command line, and if you find it frustrating, try a graphical tool.
Frequently Asked Questions
Do I need to create a GitHub account to use Git?
No. Git and GitHub are separate things. Git is the version control software you just installed on your computer. GitHub is a website where you can store and share your Git projects. You can use Git locally on your computer without ever touching GitHub. However, if you want to back up your code online or work with other people, you will need a GitHub account (which is free to create).
What is Git Bash and should I use it instead of Command Prompt?
Git Bash is a command-line tool that comes with Git for Windows. It lets you use Unix-style commands (the same ones Mac and Linux users type) on Windows. If you are comfortable with Command Prompt or PowerShell, you do not need Git Bash. If you are learning from tutorials written for Mac or Linux, Git Bash makes those commands work on your Windows machine.
Can I uninstall Git if I change my mind?
Yes. Open Settings, go to Apps, find Git in the list, and click Uninstall. This removes Git from your computer completely. Any projects you created with Git will still exist in their folders — uninstalling Git just removes the software itself.
What if the installer fails or Git does not work after installation?
Restart your computer first — Windows often needs a restart to recognize new software. If that does not work, uninstall Git through Settings, restart again, and download the installer fresh from git-scm.com. If you still have problems, check that your Windows user account has permission to install software, or ask your IT department if your computer is locked down.