Git worktree workflow
This setup uses ,w to make branch isolation, PR checkout, issue work, and tmux session switching cheap.
| Surface | Source |
|---|---|
| CLI entry | home/exact_bin/executable_,w |
| Helpers | home/exact_lib/exact_,w/ and home/exact_lib/exact_shared/ |
| GitHub wrapper | home/exact_bin/executable_,gh-worktree |
| Visual picker | Session picker and GitHub picker |
Mental model
| Task | Use |
|---|---|
| Create an isolated branch checkout | ,w add |
| Check out PRs locally | ,w prs or the GitHub picker |
| Start work from an issue | ,w issue or ,gh-worktree issue |
| Focus a worktree's tmux session | ,w switch / ,w open |
| Rename/move branch + worktree | ,w mv |
| Remove finished work | ,w remove |
| Clean stale metadata | ,w prune |
| Check dependencies/state | ,w doctor |
Preconditions
- You are inside a git repository.
,wis installed and onPATH.- For GitHub-backed flows,
ghis authenticated.
Fast path
,w add feat/my-change main
,w prs 12345 --focus
,w issue --branch chore/fix-widget 12345 --focus
,w switch
,w remove
,w doctor
Details
- Worktree subcommands — exact flags and behavior for
add,prs,issue,ls,switch,open,mv,remove,prune, anddoctor. - GitHub worktree integration — how
,gh-worktree, the GitHub picker, repo bootstrap, Octo review, PR/issue metadata, and tmux sessions fit together.
Verification
,w ls
,w doctor
Confirm the expected worktree exists and tmux session switching works.
Rollback / undo
,w remove
,w prune --apply