Setup & TutorialsMay 2, 20262 min read9 views

Git and GitHub Workflow for Solo Developers

A pragmatic Git setup for someone working alone — sensible defaults, the commands that matter, and a workflow that scales gracefully when teammates join.

A
Admin
Git and GitHub Workflow for Solo Developers

Most Git tutorials assume you're on a team. Solo developers have different needs — fewer ceremonies, but the same need for safety. This guide is a pragmatic Git workflow for working alone, designed to scale gracefully if teammates join later.

One-time setup

# Identity
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

# Sensible defaults
git config --global init.defaultBranch main
git config --global pull.rebase true
git config --global push.autoSetupRemote true
git config --global core.editor "code --wait"
git config --global rebase.autosquash true

Authenticate with GitHub

Use the GitHub CLI — it handles SSH keys and credentials so you never paste a token again.

brew install gh           # or your platform's installer
gh auth login
# pick GitHub.com, HTTPS, browser auth

Day-to-day flow

  1. Create a branch for every change, even alone: git checkout -b feat/something.
  2. Commit small, focused changes with imperative messages: git commit -m "add login route".
  3. Push and let GitHub Pages, Vercel, or Actions do their thing: git push.
  4. Open a PR — even solo. Future-you will thank you for the rationale.
  5. Merge and delete the branch.

The five commands you actually use

  • git status — what's the situation?
  • git diff — what's changed?
  • git add -p — stage hunks interactively (this is the secret to clean commits).
  • git commit -m "…"
  • git push

When things break

  • Undo last commit (keep changes): git reset --soft HEAD~1.
  • Throw away local changes: git restore . (be careful).
  • Amend the last commit: git commit --amend.
  • Pulled and got conflicts: git rebase --abort to back out, then deal with it.

GitHub features worth using solo

  • Branch protection — even alone. Forces yourself to PR.
  • Actions for CI — run tests on every push for free.
  • Dependabot — automated dependency PRs.
  • Issues — your todo list with permanent links.

Habits that pay off when teammates join

If you're working alone today but might collaborate later, three habits make the transition painless: short-lived branches, descriptive commits, and PR descriptions written for future readers — not for past-you.

#git#github#workflow#macos#linux#windows