Chapter 2: Git Install
Git Install today, full teacher mode, like I’m right there in Hyderabad helping you on your laptop. ☕
It’s February 13, 2026, so we’ll use the most current real-world methods (as of early 2026, Git is at version 2.53.0, released February 2, 2026).
Goal today: Get Git running properly on your machine + do the first important setup steps so you never get “command not found” or weird errors later.
We’ll cover the three main OS families: Windows (most common for beginners in India), macOS, and Linux (Ubuntu-style, very popular on servers & among devs).
Step 0: First — Check if Git is already there (very important!)
Open your terminal / command prompt / PowerShell / Git Bash and type:
|
0 1 2 3 4 5 6 |
git --version |
- If you see something like git version 2.53.0.windows.1 or git version 2.53.0 → already installed! → skip to Post-Install Setup at the bottom.
- If “command not found” / “git is not recognized” → let’s install.
1. Installing Git on Windows (Windows 10 / 11 — 2026 way)
Recommended method: Use the official installer from git-scm.com (includes Git Bash — a mini Linux-like terminal that’s super useful).
-
Go to official site → https://git-scm.com/download/win (or just Google “download git” — first result is safe)
→ It auto-detects and offers 64-bit setup (most laptops 2026 are 64-bit). Direct link (as of Feb 2026): https://git-scm.com/install (click Windows)
-
Download Git-2.53.0-64-bit.exe (or whatever the latest says — ~50–60 MB)
-
Double-click the .exe file
Important choices during installer (2026 defaults are good, but here’s what smart people usually pick):
- Licensing → Next
- Select Destination Location → Default is fine (C:\Program Files\Git)
- Select Components → Keep defaults + check:
- “Git Bash Here” (right-click magic)
- “Git GUI Here”
- “Windows Explorer integration”
- Select Start Menu Folder → Default
- Choosing the default editor → Pick Visual Studio Code if you have it (very popular), or Nano (simple), or Vim (if you’re brave)
- Adjusting your PATH environment → Choose Git from the command line and also from 3rd-party software (recommended — most flexible)
- Choosing HTTPS transport backend → Use OpenSSL library (default & secure)
- Configuring the line ending conversions → Checkout Windows-style, commit Unix-style line endings (best for cross-platform teams)
- Configuring the terminal emulator → Use MinTTY (default — looks nicer than old console)
- Default behavior of git pull → Default (fast-forward or merge)
- Choose a credential helper → Git Credential Manager (modern, works with GitHub, GitLab, etc.)
- Extra options → Enable file system caching + symbolic links (both checked)
- Experimental features → Usually leave unchecked unless you want to try new stuff
-
Install → wait 1–2 minutes → Finish
-
Open Git Bash (search in Start menu “Git Bash”)
Test:
Bash01234567git --version# should show git version 2.53.0.windows.1 or similar
Alternative super-fast way (if you have Winget — comes with modern Windows):
|
0 1 2 3 4 5 6 |
winget install --id Git.Git -e --source winget |
2. Installing Git on macOS (2026 — Ventura / Sonoma / Sequoia / whatever Apple calls it now)
Two easy ways — pick one.
Way A — Easiest (Xcode Command Line Tools — Apple official)
-
Open Terminal (Spotlight → Terminal)
-
Type any git command:
Bash0123456git --version→ Popup appears: “The xcode-select command requires the command line developer tools. Would you like to install the tools?”
-
Click Install → agree → wait 5–10 min (downloads ~500 MB)
→ Done! Git version usually 2.39.x or newer (Apple lags a bit)
Way B — Latest version via Homebrew (recommended for devs)
-
Install Homebrew if not present (paste in Terminal):
Bash0123456/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Then install Git:
Bash0123456brew install git -
Verify:
Bash0123456git --version # should be 2.53.0 or very close
3. Installing Git on Linux (Ubuntu / Debian / Pop!_OS / Mint — most common)
Open terminal:
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 |
# Update package list sudo apt update # Install git sudo apt install git -y # Optional: full suite (includes gitk, git-gui etc.) sudo apt install git-all -y |
For Fedora / RHEL / CentOS:
|
0 1 2 3 4 5 6 7 8 |
sudo dnf install git -y # or sudo yum install git -y (older versions) |
For Arch / Manjaro:
|
0 1 2 3 4 5 6 |
sudo pacman -S git |
Verify:
|
0 1 2 3 4 5 6 |
git --version |
Post-Install Setup — Do this on EVERY machine (very important!)
Once installed, tell Git who you are (this appears in every commit):
|
0 1 2 3 4 5 6 7 |
git config --global user.name "Webliance" git config --global user.email "your-real-email@gmail.com" # use the one for GitHub |
Recommended extras (2026 best practices):
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# Set default branch to main (not master) git config --global init.defaultBranch main # Make git log pretty git config --global alias.lg "log --oneline --graph --all --decorate" # Default editor (change to what you like) git config --global core.editor "code --wait" # VS Code # or "nano" # or "vim" # Optional: enable color git config --global color.ui auto |
Now test everything:
|
0 1 2 3 4 5 6 |
git config --global --list |
You should see your name, email, etc.
Quick Troubleshooting Table (common 2026 issues)
| Problem | Fix / Check |
|---|---|
| git not recognized in CMD/PowerShell | Reopen terminal or restart computer (PATH issue) |
| Git Bash opens in wrong folder | Set HOME env var → right-click This PC → Properties → Env Variables → User variables → New → HOME = D:\Code or wherever |
| Old version after install | You had old one → uninstall old via Control Panel, reinstall fresh |
| macOS says old version | Use brew install git + add to PATH: echo ‘export PATH=”/opt/homebrew/bin:$PATH”‘ >> ~/.zshrc then source ~/.zshrc |
| Permission denied on Linux | Forgot sudo before apt install |
Done! 🎉 You now have Git installed and configured like a pro.
Next step? Create your first repo:
|
0 1 2 3 4 5 6 7 8 9 10 11 |
mkdir learn-git-today cd learn-git-today git init echo "# Hello Git 2026" > README.md git add README.md git commit -m "First commit from Hyderabad" |
Any trouble during install? Tell me your OS + exact error — we’ll fix it together step by step. You’re almost ready to push to GitHub!
Keep going! 🚀
