For Designers
Git for Designers
Commits, branches, pull requests, and undo explained for designers working with Claude Code. Read this before Guide 07.
You are working with Claude Code and it keeps mentioning commits, branches, and pull requests. You do not know what those mean. You are worried about breaking something or losing your work.
You'll understand enough Git to work confidently with Claude Code: save your work, undo mistakes, and share files with a developer without memorising commands.
What you walk away with
A working Git repo set up and connected to GitHub in under 5 minutes
The six Git concepts you actually need: repo, commit, push, pull, undo, and pull request
Enough vocabulary to follow what Claude Code is doing and tell it what you want
Start a new project repo
Before Claude Code can save your work, you need a Git repository. Open Terminal (Mac: press Command + Space, type Terminal, press Enter. Windows: press Windows key, type PowerShell, press Enter). Every command in this guide is typed there and run with Enter. You also need a free GitHub account at github.com and a new empty repo created there before running git remote add (go to github.com/new, click New repository, leave it empty). The last command, claude, starts your Claude Code session. If it shows "command not found", install Claude Code at claude.ai/download first.
# 1. Create your project folder and enter it
mkdir my-design-project
cd my-design-project
# 2. Initialise Git (creates the .git folder)
git init
# 3. Go to github.com/new, create an empty repo, then paste its URL below
git remote add origin https://github.com/your-username/my-design-project.git
# 4. Start Claude Code (install at claude.ai/download if needed)
claudeWhat a commit is
A commit is a named save point. When Claude edits a file and commits the change, that save point exists permanently in your project history. Think of it like Google Docs version history, except permanent and navigable from any point. If you have made any commits already, run git log --oneline to see them. On a brand-new project, this returns nothing yet and that is expected.
# See your commit history (one line per commit)
# On a brand-new project this returns nothing -- that is normal
git log --onelineMake a commit
After Claude edits your files, you commit those changes to save them to history. Three commands: check what changed, stage the files you want to save, commit with a message.
# See what Claude changed
git status
# Stage all changed files
git add .
# Commit with a message
git commit -m "Update button component spacing"Push and pull
Your local commits only exist on your machine until you push them. The first time you push a new project, use git push -u origin main. The -u links your local branch to GitHub so all future pushes in this project can use plain git push. Pull brings in commits from GitHub. Working solo: push after each session and pull when you start a new one.
# First push on a new project (use -u to link your branch to GitHub)
git push -u origin main
# All future pushes in the same project
git push
# Get the latest commits from GitHub
git pullUndo a commit
If Claude made changes you want to reverse, git revert creates a new commit that undoes a previous one. It does not delete history. It adds an undo on top. Safer than git reset for anything already pushed to GitHub. The --no-edit flag skips the commit message editor (otherwise Git opens vim, which requires typing :wq to exit).
# See recent commits and find the one to undo
git log --oneline
# Undo that commit (replace the ID with yours, --no-edit skips the editor)
git revert a3f92c1 --no-edit
# Push the undo to GitHub
git pushWhat a pull request is
A branch is an isolated copy of your project where changes happen without affecting the main version. When you work with Claude Code on a new feature, Claude creates a branch. When the work is ready, you open a pull request: a proposal to merge the branch's changes into the main version. A developer reviews it, then merges it. That is how changes move from "Claude built this" to "this is in the product". The gh pr create command requires the GitHub CLI (install at cli.github.com).
# Create a branch for a new feature
git checkout -b feature/new-checkout-flow
# ... Claude Code works here and commits changes ...
# Open a pull request (requires GitHub CLI: cli.github.com)
gh pr create --title "New checkout flow" --body "Built with Claude Code"What's next?
Build your first flow with Claude CodeNew guides, when they ship
One email, roughly weekly. CLAUDE.md templates, workflows I actually use, and the cut-for-length stuff that does not make the public guides. One-click unsubscribe.
Or follow on Substack