Skip to content

Commit 5d7003b

Browse files
committed
update: README.md
1 parent 796698c commit 5d7003b

File tree

1 file changed

+42
-16
lines changed

1 file changed

+42
-16
lines changed

README.md

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,57 @@
77
## Table of Contents
88

99
- [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)
1015
- [Installation](#installation)
1116
- [Environment](#environment)
1217

1318
## Commands
1419

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: ![Create demo](tapes/gifs/create.gif)
20+
### `rsworktree create`
1821

19-
- `rsworktree cd <name> [--print]`
20-
- Spawn an interactive shell rooted in the named worktree. Use `--print` to output the path instead.
21-
- Demo: ![CD demo](tapes/gifs/cd.gif)
22+
- Create a new worktree under `.rsworktree/<name>`, branching at `<name>` by default or from `--base` if provided.
23+
- Demo: ![Create demo](tapes/gifs/create.gif)
24+
- Options:
25+
- `--base <branch>` — branch from `<branch>` instead of `<name>`.
2226

23-
- `rsworktree ls`
24-
- List all worktrees tracked under `.rsworktree`, showing nested worktree paths.
25-
- Demo: ![List demo](tapes/gifs/ls.gif)
27+
### `rsworktree cd`
2628

27-
- `rsworktree rm <name> [--force]`
28-
- Remove the named worktree. Pass `--force` to mirror `git worktree remove --force` behavior.
29-
- Demo: ![Remove demo](tapes/gifs/rm.gif)
29+
- Spawn an interactive shell rooted in the named worktree. Use `--print` to output the path instead.
30+
- Demo: ![CD demo](tapes/gifs/cd.gif)
31+
- Options:
32+
- `--print` — write the worktree path to stdout without spawning a shell.
3033

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: ![PR demo](tapes/gifs/pr_github.gif)
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: ![List demo](tapes/gifs/ls.gif)
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: ![Remove demo](tapes/gifs/rm.gif)
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: ![PR demo](tapes/gifs/pr_github.gif)
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`.
3561

3662
## Installation
3763

0 commit comments

Comments
 (0)