This guide will help you install and configure Git on macOS before the workshop.
git --versionIf you see a version number, Git is already installed.
Homebrew is a package manager for macOS. If you don’t already have it, install it first:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"After installation, follow the instructions in the terminal to add Homebrew to your shell path. For example, run:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"Now install Git:
brew install gitxcode-select --installgit --versionSet your username and email (used in commits):
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
git config --listssh-keygen -t ed25519 -C "your-email@example.com"Press Enter to accept defaults (saves to ~/.ssh/id_ed25519).
eval "$(ssh-agent -s)"ssh-add --apple-use-keychain ~/.ssh/id_ed25519cat ~/.ssh/id_ed25519.pubNow go to GitHub → Settings → SSH and GPG keys → New SSH key and paste it.
✅ You’re now ready to use Git with GitHub on macOS!