Skip to main content

Clone your first repository

Use repo get to clone any repository. Repo Manager automatically creates a bare repository with a worktree for the default branch:
repo get github.com/user/repo
This creates the following structure:
$REPO_BASE_DIR/github.com/user/repo/
├── .bare/       # bare git repo
├── .git         # file pointing to .bare
└── main/        # worktree for main branch (you're here)
You’re automatically placed in the main/ worktree and can start working immediately.
Repo Manager accepts multiple URL formats:
  • github.com/user/repo
  • https://github.com/user/repo
  • [email protected]:user/repo.git
  • user/repo (assumes github.com)

Create a new worktree

Now let’s create a worktree for a new feature branch:
repo wt add feature-auth
Repo Manager creates a new branch from the default branch, sets up the worktree, and changes into it:
$REPO_BASE_DIR/github.com/user/repo/
├── .bare/
├── .git
├── main/
└── feature-auth/    # new worktree (you're here)
You’re now in an isolated directory for the feature-auth branch. Make commits, run builds, do whatever you need—it won’t affect your main/ worktree.
If the branch already exists on the remote, repo wt add will check it out. If it doesn’t exist, a new branch is created.

Switch between worktrees

Switch to a different worktree with repo wt go:
repo wt go main
# Now in main/ worktree

repo wt go feature-auth
# Back in feature-auth/ worktree
No stashing, no checkout conflicts. Just instant context switching.

List all worktrees

See all worktrees for the current repository:
repo wt list
Output:
worktree /home/user/repos/github.com/user/repo/.bare
bare

worktree /home/user/repos/github.com/user/repo/main
HEAD detached at 1a2b3c4

worktree /home/user/repos/github.com/user/repo/feature-auth
HEAD detached at 5d6e7f8
Use repo goto to jump to any repository from anywhere in your system:
repo goto user/repo
If the repository has multiple worktrees and you have fzf installed, you’ll get an interactive picker. Otherwise, you’ll go to the default branch worktree.
You can use partial paths with repo goto. For example, repo goto myapp will navigate to github.com/user/myapp if it exists.

Review a pull request

One of Repo Manager’s most powerful features is effortless PR review. Let’s review PR #42:
repo wt pr 42
Repo Manager:
  1. Fetches the PR branch using GitHub CLI
  2. Creates a worktree for it
  3. Changes into the worktree
$REPO_BASE_DIR/github.com/user/repo/
├── .bare/
├── .git
├── main/
├── feature-auth/
└── fix-bug-in-auth/    # PR #42 branch (you're here)
Review the code, run tests, make comments. When you’re done:
repo wt rm fix-bug-in-auth
The PR worktree is removed, and you’re back to your previous work.
The repo wt pr command requires the GitHub CLI (gh) to be installed and authenticated. See the installation guide for setup instructions.

Complete PR review workflow

Here’s a realistic PR review scenario:
# You're working on feature-auth worktree
cd ~/repos/github.com/user/repo/feature-auth

# Request comes in to review PR #42
repo wt pr 42              # creates worktree, cd's into it
npm install                # install dependencies
npm test                   # run tests
npm run dev                # test the feature locally

# Leave feedback on GitHub, approve the PR
gh pr review 42 --approve -b "LGTM!"

# Clean up the PR worktree
repo wt rm fix-bug-in-auth

# Back to your feature work
repo wt go feature-auth
No stashing, no lost context, no friction.

Clean up worktrees

After reviewing multiple PRs, you might have several worktrees. Clean up all except the default branch:
repo wt clean
This removes all worktrees except main/ (or whatever your default branch is). To remove a single worktree:
repo wt rm feature-auth
You cannot remove the default branch worktree. repo wt rm main will fail with an error.

Common workflows

Parallel development

Work on multiple features simultaneously:
repo wt add feature-auth
repo wt add feature-payments
repo wt add feature-dashboard

# In one terminal
cd ~/repos/github.com/user/repo/feature-auth
npm run dev

# In another terminal
cd ~/repos/github.com/user/repo/feature-payments
npm test --watch

# In another terminal
cd ~/repos/github.com/user/repo/feature-dashboard
code .
Each worktree is independent. Run different servers, different builds, different branches—all at once.

Working with existing repositories

If you already have repositories cloned the standard way, convert them:
cd ~/existing-repo
repo convert
This converts your repository to the bare + worktree layout without losing any work.

Next steps

You now know the basics of Repo Manager. Here are some areas to explore:

Commands reference

Complete reference for all repo commands

Worktree management

Advanced worktree workflows and techniques

Configuration

Customize hooks, aliases, and environment variables

Migration guide

Convert existing repositories to worktree layout

Build docs developers (and LLMs) love