git worktree
https://git-scm.com/docs/git-worktree
同一リポジトリ内で複数の作業ディレクトリ(ワークツリー: working tree)を管理できる機能
通常 1 リポジトリ 1 ワークツリー
コードレビュー のときに「別のブランチへ移動するときに変更差分を一時的に退避(git stash -u) して、git checkout する」という手間が省ける
Claude Code を 並列処理 する場合にも有用
基本操作
git worktree add <名前> <ブランチ名>: 新しいワークツリー作成
git worktree remove <名前>: ワークツリーの削除
#Git