8.1 KiB
Installation Guide for Windows 11
This guide will help you install everything needed for the Git Workshop on Windows 11.
Quick Start (Automated Installation)
Easiest option: Run our one-shot installation script that automatically installs all required tools using winget.
- Open PowerShell or Windows Terminal
- Navigate to the git-workshop directory
- Run the installation script:
.\install-prerequisites.ps1
The script will:
- Check if tools are already installed
- Install PowerShell 7, Git 2.23+, and Visual Studio Code
- Prompt you for optional tools (Python 3.12, Windows Terminal)
- Show clear progress and verify each installation
- Display Git configuration instructions when complete
If you prefer manual installation, continue with the detailed steps below.
Prerequisites
You'll need administrator access to install software on your Windows 11 machine.
What You'll Install
- PowerShell 7 - Modern cross-platform PowerShell (replaces the older Windows PowerShell 5.1)
- Git - Version control system (2.23 or later)
- Visual Studio Code - Modern code editor with excellent Git integration
Manual Installation Steps
1. Install PowerShell 7
PowerShell 7 is the modern, cross-platform version of PowerShell. Windows 11 comes with PowerShell 5.1, but we recommend PowerShell 7 for the best experience.
Option A: Using winget (Recommended)
Open Windows Terminal or Command Prompt and run:
winget install --id Microsoft.PowerShell --source winget
Option B: Manual Download
- Visit https://github.com/PowerShell/PowerShell/releases/latest
- Download the file ending in
-win-x64.msi(e.g.,PowerShell-7.4.1-win-x64.msi) - Run the installer
- Accept all defaults
Verify Installation:
Open a new terminal and run:
pwsh --version
You should see version 7.x.x or higher.
Important: After installing PowerShell 7, use it instead of the older "Windows PowerShell 5.1". Look for "PowerShell 7" in your Start menu or Windows Terminal.
2. Install Git
Git is the version control system you'll learn in this workshop. You need version 2.23 or later.
Option A: Using winget (Recommended)
winget install --id Git.Git -e --source winget
Option B: Manual Download
- Visit https://git-scm.com/downloads
- Click "Windows"
- Download the 64-bit installer
- Run the installer with these recommended settings:
- Default editor: Choose "Visual Studio Code" (we'll install it next)
- PATH environment: Select "Git from the command line and also from 3rd-party software"
- Line ending conversions: Choose "Checkout Windows-style, commit Unix-style line endings"
- Terminal emulator: Choose "Use Windows' default console window"
- All other settings: Accept defaults
Verify Installation:
Open a new PowerShell window and run:
git --version
You should see version 2.23 or higher (e.g., git version 2.43.0).
3. Install Visual Studio Code
VS Code is a free, powerful code editor with excellent Git integration.
Option A: Using winget (Recommended)
winget install --id Microsoft.VisualStudioCode --source winget
Option B: Manual Download
- Visit https://code.visualstudio.com/
- Click "Download for Windows"
- Run the installer
- During installation, check these options:
- ✅ Add "Open with Code" action to Windows Explorer file context menu
- ✅ Add "Open with Code" action to Windows Explorer directory context menu
- ✅ Register Code as an editor for supported file types
- ✅ Add to PATH
Verify Installation:
code --version
You should see version information.
Recommended VS Code Extensions:
Open VS Code and install these extensions for the best Git experience:
-
GitLens - Supercharge Git capabilities
- Press
Ctrl+Shift+Xto open Extensions - Search for "GitLens"
- Click Install
- Press
-
Git Graph - View Git history visually
- Search for "Git Graph"
- Click Install
-
PowerShell - Better PowerShell support
- Search for "PowerShell"
- Install the one from Microsoft
Configure Git
Before making your first commit, tell Git who you are:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Verify your configuration:
git config --global user.name
git config --global user.email
You should see your name and email printed.
Optional: Set VS Code as Git's Default Editor
If you installed Git before VS Code, configure Git to use VS Code:
git config --global core.editor "code --wait"
PowerShell Execution Policy
When running PowerShell scripts (.ps1 files) in this workshop, you might encounter an error about execution policies.
If you see an error like "script cannot be loaded because running scripts is disabled":
Open PowerShell 7 as Administrator and run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
This allows you to run local scripts while maintaining security for downloaded scripts.
Running Scripts in the Workshop
After installation, you can run workshop scripts using:
.\setup.ps1
.\verify.ps1
.\reset.ps1
Example workflow:
# Navigate to a module
cd 01-essentials\01-basics
# Run the setup script
.\setup.ps1
# Complete the challenge using Git commands
# ...
# Verify your solution
.\verify.ps1
Optional: Python (for Module 08 only)
Module 08 (Multiplayer Git) uses Python for "The Great Print Project". You only need this for that specific module.
Install Python 3.12:
winget install --id Python.Python.3.12 --source winget
Verify installation:
python --version
You should see Python 3.12.x or higher.
Optional: Windows Terminal (Highly Recommended)
Windows Terminal provides a modern terminal experience with tabs, better colors, and PowerShell 7 integration.
Install:
winget install --id Microsoft.WindowsTerminal --source winget
Or install from the Microsoft Store (search for "Windows Terminal").
After installation:
- Press
Win+Xand select "Windows Terminal" - Or search "Terminal" in the Start menu
- PowerShell 7 should be the default profile
Verify Complete Installation
Run these commands to verify everything is installed correctly:
# PowerShell version (should be 7.x.x)
pwsh --version
# Git version (should be 2.23 or higher)
git --version
# VS Code version
code --version
# Git configuration
git config --global user.name
git config --global user.email
# Optional: Python (for Module 08)
python --version
Troubleshooting
Git command not found
If git --version doesn't work after installation:
- Close and reopen your terminal (Git needs a new terminal to update PATH)
- Restart your computer if the problem persists
VS Code command not found
If code --version doesn't work:
- Ensure you checked "Add to PATH" during installation
- Close and reopen your terminal
- If still not working, reinstall VS Code with the PATH option enabled
PowerShell execution policy errors
If you can't run .ps1 scripts:
- Open PowerShell 7 as Administrator
- Run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - Close admin PowerShell and try again in a regular PowerShell window
winget command not found
If winget doesn't work:
- Update Windows 11 to the latest version (Settings → Windows Update)
- Install "App Installer" from the Microsoft Store
- Restart your computer
You're Ready!
Once all verification commands work, you're ready to start the workshop!
# Clone or download the git-workshop repository
# Navigate to it
cd path\to\git-workshop
# Start with Module 01
cd 01-essentials\01-basics
# Read the instructions
code README.md
# Run setup and begin!
.\setup.ps1
Next Steps
- Read the main README.md for workshop overview
- Check GIT-CHEATSHEET.md for Git command reference
- Start with Module 01:
01-essentials\01-basics
Happy learning!