I prefer to work with bare repos that have separate worktrees. I find this makes it simpler to manage and work on multiple branches while PRs are being reviewed.

Here’s the process to set up a new repo:

  1. git clone --bare <repo> <repo-path>
  2. cd <repo>
  3. git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
  4. git worktree add <worktree_base>/<branch> <branch>

repo-path is simply where the bare repo will be stored on disk. I typically keep a file-structure and naming convention:

root/
├── .repo/
└── repo.worktrees/
    ├── branch1/
    └── branch2/