|
7 | 7 | ## Table of Contents |
8 | 8 |
|
9 | 9 | - [Commands](#commands) |
| 10 | + - [`rsworktree create`](#rsworktree-create) |
| 11 | + - [`rsworktree cd`](#rsworktree-cd) |
| 12 | + - [`rsworktree ls`](#rsworktree-ls) |
| 13 | + - [`rsworktree rm`](#rsworktree-rm) |
| 14 | + - [`rsworktree pr-github`](#rsworktree-pr-github) |
10 | 15 | - [Installation](#installation) |
11 | 16 | - [Environment](#environment) |
12 | 17 |
|
13 | 18 | ## Commands |
14 | 19 |
|
15 | | -- `rsworktree create <name> [--base <branch>]` |
16 | | - - Create a new worktree under `.rsworktree/<name>`, branching at `<name>` by default or from `--base` if provided. |
17 | | - - Demo:  |
| 20 | +### `rsworktree create` |
18 | 21 |
|
19 | | -- `rsworktree cd <name> [--print]` |
20 | | - - Spawn an interactive shell rooted in the named worktree. Use `--print` to output the path instead. |
21 | | - - Demo:  |
| 22 | +- Create a new worktree under `.rsworktree/<name>`, branching at `<name>` by default or from `--base` if provided. |
| 23 | +- Demo:  |
| 24 | +- Options: |
| 25 | + - `--base <branch>` — branch from `<branch>` instead of `<name>`. |
22 | 26 |
|
23 | | -- `rsworktree ls` |
24 | | - - List all worktrees tracked under `.rsworktree`, showing nested worktree paths. |
25 | | - - Demo:  |
| 27 | +### `rsworktree cd` |
26 | 28 |
|
27 | | -- `rsworktree rm <name> [--force]` |
28 | | - - Remove the named worktree. Pass `--force` to mirror `git worktree remove --force` behavior. |
29 | | - - Demo:  |
| 29 | +- Spawn an interactive shell rooted in the named worktree. Use `--print` to output the path instead. |
| 30 | +- Demo:  |
| 31 | +- Options: |
| 32 | + - `--print` — write the worktree path to stdout without spawning a shell. |
30 | 33 |
|
31 | | -- `rsworktree pr-github [<name>] [--no-push] [--draft] [--fill] [--web] [--reviewer <login> ...] [-- <extra gh args>]` |
32 | | - - Push the worktree branch (unless `--no-push`) and invoke `gh pr create` with the provided options. When `<name>` is omitted, the command uses the current `.rsworktree/<name>` directory. If you don’t supply PR metadata flags, `rsworktree` automatically adds `--fill`; you can pass `--title/--body` or `--web` to override that behaviour. |
33 | | - - Demo:  |
34 | | - - Requires the [GitHub CLI](https://cli.github.com/) (`gh`) to be installed and on your `PATH`. |
| 34 | +### `rsworktree ls` |
| 35 | + |
| 36 | +- List all worktrees tracked under `.rsworktree`, showing nested worktree paths. |
| 37 | +- Demo:  |
| 38 | +- Options: |
| 39 | + - _(none)_ |
| 40 | + |
| 41 | +### `rsworktree rm` |
| 42 | + |
| 43 | +- Remove the named worktree. Pass `--force` to mirror `git worktree remove --force` behavior. |
| 44 | +- Demo:  |
| 45 | +- Options: |
| 46 | + - `--force` — force removal, mirroring `git worktree remove --force`. |
| 47 | + |
| 48 | +### `rsworktree pr-github` |
| 49 | + |
| 50 | +- Push the worktree branch (unless `--no-push`) and invoke `gh pr create` with the provided options. When `<name>` is omitted, the command uses the current `.rsworktree/<name>` directory. If you don’t supply PR metadata flags, `rsworktree` automatically adds `--fill`; you can pass `--title/--body` or `--web` to override that behaviour. |
| 51 | +- Demo:  |
| 52 | +- Requires the [GitHub CLI](https://cli.github.com/) (`gh`) to be installed and on your `PATH`. |
| 53 | +- Options: |
| 54 | + - `<name>` — optional explicit worktree to operate on; defaults to the current directory. |
| 55 | + - `--no-push` — skip pushing the branch before creating the PR. |
| 56 | + - `--draft` — open the PR in draft mode. |
| 57 | + - `--fill` — let `gh pr create` auto-populate PR metadata. |
| 58 | + - `--web` — open the PR creation flow in a browser instead of filling via CLI. |
| 59 | + - `--reviewer <login>` — add one or more reviewers by GitHub login. |
| 60 | + - `-- <extra gh args>` — pass additional arguments through to `gh pr create`. |
35 | 61 |
|
36 | 62 | ## Installation |
37 | 63 |
|
|
0 commit comments