Installing Git

Before you can master Git commands or start pushing your code like a pro, you’ve gotta do the unsexy part: install Git. But don’t worry—it’s actually painless. Unless you ignore the instructions and download it from some sketchy site. (Ask me how I know. 😅)

In this lesson, I’ll walk you through installing Git on Windows, macOS, or Linux. We’ll also do a quick setup so Git knows who you are. Yes, Git needs to know your name—it’s weirdly personal like that.

Let’s do it.

Step 1: Download Git from the Official Source

Head over to the official Git website. Not some random Git tutorial blog or fishy download site—go to the source.

Why? Because:

  • It detects your operating system automatically.
  • You’ll get the latest stable version.
  • It won’t install malware that mines crypto in the background.

Don’t laugh—I’ve seen devs install Git from the wrong site and end up with “Bonus Software.” Always use the official Git SCM site.

Step 2: Install Git (by Operating System)

Let’s break it down OS-by-OS.

✅ Windows

  1. 1
    Download the .exe file from the Git site.
  2. 2
    Double-click it.
  3. 3
    Keep clicking “Next” like your life depends on it—unless you really know what you’re doing, the default settings are fine.
  4. 4
    Click “Install” and wait a few moments.
  5. 5
    Once done, open “Git Bash” from your Start menu. That’s your new command-line playground.

Pro tip: “Git Bash” gives you Unix-like commands on Windows. It feels like cheating. In a good way.

🍏 macOS

Got Homebrew? Great. If not, install it from brew.sh first (it’s worth it for dev life). Then run:

bash
1
          brew install git
        

Once that’s done, verify the install:

bash
1
          git --version
        

If you see a version number like git version 2.x.x, congrats—you’re in business.

🐧 Linux (Ubuntu/Debian)

Pop open your terminal and run:

bash
1
2
          sudo apt update
sudo apt install git
        

Then confirm it’s working:

bash
1
          git --version
        

Boom. Git installed. Zero drama.

Step 3: Tell Git Who You Are

This part is easy to skip but super important.

When you make commits (save points in your code), Git attaches your name and email to them. So unless you want your commits showing up as “Unknown Hacker,” run these:

bash
1
2
          git config --global user.name "Your Name"
git config --global user.email "you@example.com"
        

Don’t worry—you only need to do this once. It applies to all future Git projects.

To confirm what you set:

bash
1
          git config --list
        

That’ll show your name, email, and a few other useful settings. You’re officially recognizable in Git’s eyes.

Real Talk: My First Install Disaster

When I first installed Git, I skipped the name/email config. No big deal, right? Well… months later, all my early commits were marked with my old email from a forgotten blog account. It was like some ghost version of me was doing all the work.

Moral of the story? Take 30 seconds now, avoid awkwardness later. You’re welcome.

You're Ready!

Installing Git is the first step to leveling up your coding game. You’ve now got a powerful version control tool on your machine—and you're set up properly, like a professional.

Next up? We’re diving into how to start Git in a real JavaScript project. You’ll learn how to initialize Git in a folder, track your code, and make your very first commit—all inside an actual JS project setup. It’s where theory finally meets practice. Let’s go from “I installed Git” to “I’m version-controlling like a dev ninja.” 🥷

Get ready—this is where you go from “just coding” to actually managing your code like a boss. 👨‍💻👩‍💻