switch
The switch command allows you to change your active branch to any branch in your stack.
Aliases: co (short for "checkout")
Usage
bash
# Switch to a specific branch
pq switch branch-name
pq co branch-name
# Interactive branch selection
pq switch
pq coArguments
| Argument | Description |
|---|---|
branch-name | The name of the branch to switch to (optional) |
Examples
Switch to a Specific Branch
bash
$ pq switch feature-authInteractive Branch Selection
If you run pq switch without arguments, you'll see an interactive menu:
bash
$ pq switch
? Select a branch to switch to: (Use arrow keys)
main
feature-backend
❯ feature-auth
feature-auth-ui