Claude Code knows git. It can stage your changes, write a commit message that actually describes them, create a branch, and open a pull request - the ceremony around a change, handled by the agent while you decide what goes in.
Ask in plain language and Claude runs the git commands for you:
git add the files you point at, or the ones it
just edited.A good commit message comes from the actual change. Claude reads the staged diff - the lines added and removed - and describes that. This is why the messages are specific: "fix unbound variable in tally.sh" rather than "bug fix". The diff is the source of truth, and Claude has read it.
Committing is where a change becomes part of history, so this is the step to slow down on. Before you let Claude commit, look at what it staged:
git diff --staged
Confirm it is committing what you meant - no stray files, no secrets, no half-finished edit swept in. The commit message should match the diff you just read.
A few habits keep git work with an agent low-risk:
main, so mistakes are easy to
throw away.main on a
team repo is the move to avoid.Your lab setup
This VM comes with Claude Code preinstalled and signed in - just run claude to start.