Episode 2 of 12
Installing Git
Learn how to install and configure Git on your computer.
Let's get Git installed on your computer and configure it for first use.
Download Git
Visit git-scm.com and download the installer for your operating system:
- Windows — download the
.exeinstaller and follow the setup wizard - macOS — install via Homebrew:
brew install git - Linux — use your package manager:
sudo apt install git
Verify Installation
git --version
# Output: git version 2.43.0 (or similar)
Configure Git
Set your name and email — these appear in every commit you make:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Check Your Configuration
git config --list
# Shows all your Git settings
git config user.name
# Shows just your name
Configuration Levels
--global— applies to all repositories for the current user--local— applies to the current repository only (overrides global)--system— applies to all users on the machine
Setting Up a Text Editor
# Use VS Code as the default editor
git config --global core.editor "code --wait"
# Use Notepad++ on Windows
git config --global core.editor "notepad++"