Installing Git
A step-by-step guide for absolute beginners
What is Git, and why do I need it?
Imagine you're writing an essay and you save a copy every time you make big changes, essay_v1.doc, essay_v2.doc, essay_FINAL.doc. Git does this automatically for your code, but in a much smarter way. It remembers every change you ever made, lets you go back to any earlier version, and makes it easy to work on projects with other people.
Almost every coding job, tutorial, and project uses Git. It's one of the first things developers install on a new computer.
What operating system are you using?
Go to the official Git website
Download the installer
Run the installer file
Git-2.x.x-64-bit.exe). A setup wizard will open.Click through the setup wizard
- • Click Next on the license screen
- • Leave the install location as-is, click Next
- • On "Choosing the default editor", select Visual Studio Code if you have it, otherwise leave the default and click Next
- • On every other screen, just leave the defaults and keep clicking Next
- • Click Install, then Finish
✅ What is "Git Bash"?
Git for Windows installs a program called Git Bash, a special terminal window made for using Git. After installation, you can use either Git Bash or the regular Command Prompt to run Git commands. Either works fine!
✅ Check that it worked
Let's confirm Git is installed. Open your terminal (or Git Bash on Windows) and run:
How to open Git Bash on Windows:
Click the Start menu, search for "Git Bash", and click it. A dark window will open.
git --versionYou should see something like git version 2.43.0. The exact number doesn't matter, any version number means it worked! 🎉
❌ Seeing an error instead?
Try closing and reopening the terminal, then run the command again. On Windows, make sure you're using Git Bash (not the regular Command Prompt) or try restarting your computer.
👤 One-time setup: tell Git who you are
Before you can use Git, you need to give it your name and email address. Git uses this to label every change you make, so others (and your future self!) can see who did what. You only need to do this once per computer.
Run these two commands in your terminal, replacing the example text with your own name and email:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"💡 What email should I use?
Use any email address you have. If you plan to use GitHub (a website for storing your code), use the same email you'll sign up with there.
Always download Git from the official site: git-scm.com
