Git workflow with Claude
Claude Code + professional version control
⏱ Est. ~8 min
01 · Read
In Level 4 you learned git: branches, commits, merges, and pushing to GitHub. In this lesson, you combine that workflow with Claude Code.
The professional pattern looks like this:
1. Branch — create a feature branch for new work 2. Build — use Claude Code to implement the feature 3. Review — use git diff to inspect what Claude wrote 4. Commit — save the changes with a descriptive message 5. Merge — bring the feature into your main branch 6. Push — send it to GitHub
This is how software teams work. Claude Code slots into the "Build" step — the rest of the flow doesn't change.
02 · Real-machine exercise
Start by creating a feature branch. This keeps experimental work separate from your stable main branch — exactly like you learned in Level 4.
git checkout -b feature-search
03 · Prompt template
Now use Claude Code to build the feature. Be specific about what you want — Claude will build it on your feature branch.
Add a search box that lets users filter bookmarks by title in real time as they type
04 · Real-machine exercise
Review what Claude built, then commit, merge, and push. The full cycle — from branch to deploy.
git diff
git add .
git commit -m "Add search filter feature"
git checkout main
git merge feature-search
git push
05 · Quiz
What's the correct order for using Claude with git?
- Branch, code with Claude, review, commit, push
- Commit, then write code, then review
- Write, commit, then review
- Push, then write, then commit
06 · Fill in the blank
Before starting new work with Claude, create a new git _____.
07 · Read
This is the professional flow: branch, build, review, commit, merge, push. Claude Code slots into the "build" step, and everything else stays the same.
Every feature gets its own branch. Every change gets reviewed before commit. Every commit gets pushed to GitHub. This is how real software teams ship — and now you're shipping the same way.
08 · Quiz
You just used Claude Code to build a new search feature. What should you do before git commit?
- Push to GitHub immediately
- Run git diff to review exactly what Claude changed
- Delete the feature branch
- Ask Claude to commit for you
09 · Fill in the blank
The professional flow is: branch, build, review, commit, merge, _____.
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.