Fill these in once
- Install Git
brew install gitNo Homebrew yet? Run
xcode-select --installinstead. - Set your name and email
git config --global user.name "Ada Lovelace" git config --global user.email "you@example.com" - Name new branches "main"
git config --global init.defaultBranch main
Check it worked
- See your settings
git config --global --list
Undo it
- Remove your Git settings
rm ~/.gitconfig
- Install GitNeeds sudo
sudo apt install -y git - Set your name and email
git config --global user.name "Ada Lovelace" git config --global user.email "you@example.com" - Name new branches "main"
git config --global init.defaultBranch main
Check it worked
- See your settings
git config --global --list
Undo it
- Remove your Git settings
rm ~/.gitconfig
- Install Git
winget install --id Git.Git -eClose and reopen PowerShell afterwards so it can find git.
- Set your name and email
git config --global user.name "Ada Lovelace" git config --global user.email "you@example.com" - Name new branches "main"
git config --global init.defaultBranch main
Check it worked
- See your settings
git config --global --list
Undo it
- Remove your Git settings
Remove-Item "$env:USERPROFILE\.gitconfig"

New to Git? I explain it in plain English on Layman Terms.