Getting Started
Dev Environment

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 --version

If you see a version number, skip to configuration.

Install Git (if needed)

macOS:

xcode-select --install
# or
brew install git

Ubuntu/Debian:

sudo apt update && sudo apt install git

Windows: Download from git-scm.com (opens in a new tab) or use:

winget install Git.Git

Configure 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 true

Verify configuration

git config --list
⚠️

Use 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_ed25519

Copy 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 | clip

Add to GitHub

  1. Go to github.com/settings/keys (opens in a new tab)
  2. Click "New SSH key"
  3. Title: "My Laptop" (or descriptive name)
  4. Paste the key
  5. Click "Add SSH key"

Test connection

ssh -T git@github.com

You 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 gh

Ubuntu/Debian:

sudo apt install gh

Windows:

winget install GitHub.cli

Authenticate

gh auth login

Follow the prompts. Choose SSH if you set up SSH keys.

Verify

gh auth status

Step 4: Code Editor Setup

VS Code (Recommended)

Essential Extensions

ExtensionPurpose
GitLensEnhanced Git integration
GitHub Pull RequestsReview PRs in editor
EditorConfigRespect project settings
ESLint / PrettierCode formatting
Error LensInline 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 $USER

Verification 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.x

Common 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                   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘