Git for multi-agent work
For engineers
Branches, worktrees, rebase and recovery when several agents and people commit to one repository at once
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
Why does a second agent need its own worktree and not just its own branch?
Check yourself · 2 of 5
When is it safe to rebase a branch?
Check yourself · 3 of 5
What does git bisect run need in order to work without your help?
Check yourself · 4 of 5
After an agent runs git reset --hard, where do you look first for the lost commits?
Check yourself · 5 of 5
Several agents edit one working tree. How should you commit your change?
Topics
- Branch and worktree layouts for parallel agents4 min read · One short-lived branch and one worktree per agent task, clear branch names, and why two agents never share a checkout
- Rebase, merge and agent conflict resolution5 min read · Choosing rebase or merge, resolving conflicts between two agents' branches, and checking that an agent's conflict resolution kept both changes
- Finding the breaking commit with bisect4 min read · Automated git bisect with a test command across a long run of small agent commits
- Recovering from destructive git operations5 min read · Reflog, remote refs and backups to undo a hard reset, a bad rebase or a force push, plus branch protection that stops agents doing it again
- Many committers in one checkout5 min read · Staging explicit paths, lock files, push races and stray files when several agents and people commit in the same working tree
Start here
- Pro Git book (opens in a new tab)BookFree
The free reference book for branching, rebasing, reset and recovery, written by Git's maintainers' community.
- git-worktree documentation (opens in a new tab)DocsFree
How to give each task its own checkout of one repository, and how to list, lock and remove them.
- git-bisect documentation (opens in a new tab)DocsFree
Exact syntax for bisect start, good, bad, run and reset, with exit-code rules for scripts.
110 questions · last verified 2026-12