Git - Solo Builder
Fast, practical version control for one-person projects with agents.
Overview
If it is your project and you are the only one touching it, the goal is speed without losing the safety net. Commit often, keep commits small, and use shortcuts that remove the friction from doing it right every time.
Not sure which guide is right for you? See all three profiles.
The branch rule for solo work
In team contexts, branching exists to protect shared history and enable review. Solo, those reasons are less pressing. Some experienced builders commit directly to main on personal projects - that is a valid choice when you understand the trade-off and commit often enough to keep rollback precise.
If you are on a client project or anything you cannot easily reset, branch per feature. If it is yours to break, committing to main and moving fast is fine.
Shell aliases - the biggest win
The most effective change for any solo builder is removing the friction from committing. Add these to your ~/.zshrc or ~/.bashrc:
# Add all and commit in one command
alias gac='git add . && git commit -m'
# Add all, commit, and push in one command
alias gacp='git add . && git commit -m "$1" && git push' gac "fix login redirect"
gac "add newsletter card to footer"
gacp "deploy: update pricing page"Lower friction means more commits. More commits means a better safety net. After adding the aliases, reload your shell:
source ~/.zshrc gac commits locally. When you are ready to push to remote, run git push separately. Use gacp when you want to commit and push in the same step - typically when you are done with a feature and want to sync.
Note: gac stages all changed files. This works on personal projects. On shared codebases, stage specific files by name to avoid including unrelated changes.
Multi-terminal workflow
The pattern used by most solo builders with Claude Code:
git diff here, review the output, and commit when satisfied.Using Claude's output as commit messages
Claude ends most sessions with a summary of what it changed - which files, what was added, what was fixed. That summary is often a better commit message than what you would write yourself. It is precise, it lists the files, and it explains the intent.
Copy it directly from the agent terminal into your git terminal. Shorten it if needed, but you rarely need to.
Letting Claude commit
Claude can run git add and git commit directly if you allow it. This saves a context switch but it uses tokens, and the agent may stage files you did not intend to include.
Pre-session checkpoint
Before any agent session, save your current state:
gac "checkpoint: before agent session" If the session produces bad output, you return here in one command:
git reset --hard HEAD~1 Recovery patterns
git reset --soft HEAD~1git reset --hard HEAD~1git checkout HEAD~1 -- path/to/file.tsgit stash # save
git stash pop # restore
git stash drop # discard