Development Environment Setup
One-Time Setup
Do this once, and you'll be ready to contribute to any project. Don't skip steps—improper setup causes embarrassing issues later.
Environment Architecture
┌─────────────────────────────────────────────────────────────────────────────┐
│ DEVELOPMENT ENVIRONMENT STACK │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ EDITOR / IDE │ │
│ │ VS Code, WebStorm, Vim, etc. │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ VERSION CONTROL │ │
│ │ Git + GitHub CLI │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ LANGUAGE RUNTIMES │ │
│ │ Node.js, Python, Rust, Go, Java, etc. │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ PACKAGE MANAGERS │ │
│ │ npm, pnpm, pip, cargo, etc. │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ DEVELOPMENT TOOLS │ │
│ │ Docker, testing tools, linters, formatters │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘Step 1: Install Git
Check if Git is installed
git --versionIf you see a version number, skip to configuration.
Install Git (if needed)
macOS:
xcode-select --install
# or
brew install gitUbuntu/Debian:
sudo apt update && sudo apt install gitWindows: Download from git-scm.com (opens in a new tab) or use:
winget install Git.GitConfigure Git globally
# Set your identity (use your REAL name and GitHub email)
git config --global user.name "Your Full Name"
git config --global user.email "your-email@github.com"
# Set default branch to main
git config --global init.defaultBranch main
# Set useful defaults
git config --global pull.rebase false
git config --global push.autoSetupRemote trueVerify configuration
git config --listUse Your GitHub Email
The email in git config MUST match your GitHub account email, or your commits won't be linked to your profile.
Step 2: Set Up SSH Keys
SSH keys let you authenticate to GitHub without passwords.
┌─────────────────────────────────────────────────────────────────┐
│ SSH AUTHENTICATION FLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Your Machine│ │ GitHub │ │
│ │ │ │ │ │
│ │ Private Key │ ────────► │ Public Key │ │
│ │ (stays here)│ proves │ (stored) │ │
│ │ │ identity │ │ │
│ └─────────────┘ └─────────────┘ │
│ │
│ NEVER share your private key. NEVER. │
│ │
└─────────────────────────────────────────────────────────────────┘Generate SSH key
ssh-keygen -t ed25519 -C "your-email@github.com"Press Enter to accept default location. Use a passphrase for extra security.
Start SSH agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519Copy public key
# macOS
cat ~/.ssh/id_ed25519.pub | pbcopy
# Linux
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard
# Windows (Git Bash)
cat ~/.ssh/id_ed25519.pub | clipAdd to GitHub
- Go to github.com/settings/keys (opens in a new tab)
- Click "New SSH key"
- Title: "My Laptop" (or descriptive name)
- Paste the key
- Click "Add SSH key"
Test connection
ssh -T git@github.comYou should see: "Hi username! You've successfully authenticated..."
Step 3: Install GitHub CLI
GitHub CLI (gh) makes many operations easier.
Install GitHub CLI
macOS:
brew install ghUbuntu/Debian:
sudo apt install ghWindows:
winget install GitHub.cliAuthenticate
gh auth loginFollow the prompts. Choose SSH if you set up SSH keys.
Verify
gh auth statusStep 4: Code Editor Setup
VS Code (Recommended)
- Install from code.visualstudio.com (opens in a new tab)
- Install command line tool: Cmd/Ctrl+Shift+P → "Shell Command: Install 'code' command in PATH"
- Sign in with GitHub (for settings sync)
Essential Extensions
| Extension | Purpose |
|---|---|
| GitLens | Enhanced Git integration |
| GitHub Pull Requests | Review PRs in editor |
| EditorConfig | Respect project settings |
| ESLint / Prettier | Code formatting |
| Error Lens | Inline error display |
Recommended Settings
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"git.autofetch": true,
"git.confirmSync": false,
"editor.rulers": [80, 120]
}Step 5: Language Runtimes
Install based on your target projects:
Step 6: Docker (Optional but Common)
Many projects use Docker for development:
# macOS / Windows: Download Docker Desktop
# https://www.docker.com/products/docker-desktop
# Linux:
sudo apt install docker.io
sudo usermod -aG docker $USERVerification Checklist
Run each command and verify output:
# Git
git --version
# ✓ Should show: git version 2.x.x
git config user.name
# ✓ Should show: Your Name
git config user.email
# ✓ Should show: your-email@github.com
# SSH
ssh -T git@github.com
# ✓ Should show: Hi username! ...
# GitHub CLI
gh auth status
# ✓ Should show: Logged in to github.com
# Editor
code --version
# ✓ Should show version number
# Node.js (if needed)
node --version
# ✓ Should show: v20.x.x or similar
# Docker (if installed)
docker --version
# ✓ Should show: Docker version x.x.xCommon Setup Issues
┌─────────────────────────────────────────────────────────────────┐
│ TROUBLESHOOTING │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Problem: "Permission denied (publickey)" │
│ Solution: SSH key not added. Run: │
│ ssh-add ~/.ssh/id_ed25519 │
│ │
│ Problem: Commits show wrong author │
│ Solution: Set git config user.name and user.email │
│ │
│ Problem: "git: command not found" │
│ Solution: Restart terminal, or add to PATH │
│ │
│ Problem: "remote: Permission to X denied to Y" │
│ Solution: Fork first, then push to YOUR fork │
│ │
└─────────────────────────────────────────────────────────────────┘