Skip to content

Commit 4eabbe3

Browse files
authored
docs(but): update but docs generation and refresh docs (#200)
* chore: update cli docs generation script for raw docs * docs(but): regenerate docs
1 parent bdb034a commit 4eabbe3

7 files changed

Lines changed: 37 additions & 22 deletions

File tree

content/docs/commands/but-branch.mdx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ the new branch from. This allows you to create stacked branches.
3939
Deletes a branch from the workspace
4040

4141
This will remove the branch and all its commits from the workspace.
42-
If the branch has unpushed commits, you will be prompted for confirmation.
42+
If the branch has unpushed commits, you will be prompted for confirmation
43+
unless the `--force` flag is used.
4344

4445
**Usage:** `but branch delete <BRANCH_NAME>`
4546

@@ -107,3 +108,24 @@ You can also choose to fetch and display review information, show files modified
107108
* `-f`, `--files` — Show files modified in each commit with line counts
108109
* `--ai` — Generate AI summary of the branch changes
109110
* `--check` — Check if the branch merges cleanly into upstream and identify conflicting commits
111+
112+
### `but branch update`
113+
114+
Update your local branch with the content of its remote counterpart.
115+
116+
This allows you to resolve the divergence between your local branch and its
117+
tracked remote in different ways.
118+
119+
**Usage:** `but branch update <BRANCH> [OPTIONS]`
120+
121+
**Arguments:**
122+
123+
* `<BRANCH>` — Name of the local branch to integrate (required)
124+
125+
**Options:**
126+
127+
* `-s`, `--strategy` `<STRATEGY>` — Strategy to use for the integration. If no strategy is specified, we default to pull-rebase (default: `pull-rebase`)
128+
* `--dry-run` — Preview the resulting branch state without persisting changes
129+
* `-v`, `--verbose` — Show additional dry-run details like the current divergence
130+
* `-i`, `--interactive` — Open the generated integration script in an editor
131+

content/docs/commands/but-diff.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ description: "Displays the diff of changes in the repo."
55

66
Without any arguments, it shows the diff of all uncommitted changes.
77
Optionally, a CLI ID argument can be provided, which chan show the diff specific to
8-
98
- an uncommitted file
109
- a branch
1110
- an entire stack
@@ -16,11 +15,10 @@ Optionally, a CLI ID argument can be provided, which chan show the diff specific
1615

1716
## Arguments
1817

19-
- `<TARGET>` — The CLI ID of the entity to show the diff for
18+
* `<TARGET>` — The CLI ID of the entity to show the diff for
2019

2120
## Options
2221

23-
- `--tui` — Open an interactive TUI diff viewer
24-
- `--no-tui` — Disable the interactive TUI diff viewer (overrides but.ui.tui config)
22+
* `--tui` — Open an interactive TUI diff viewer
23+
* `--no-tui` — Disable the interactive TUI diff viewer (overrides but.ui.tui config)
2524

26-
For diff TUI usage and keybindings, see the [TUI guide](/gitbutler-tui#use-the-diff-tui).

content/docs/commands/but-reword.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can also use `but reword <branch-id>` to rename the branch.
2121
## Options
2222

2323
* `-m`, `--message` `<MESSAGE>` — The new commit message or branch name. If not provided, opens an editor
24-
* `-f`, `--format` — Format the existing commit message to 72-char line wrapping without opening an editor
24+
* `-f`, `--fix-formatting` — Format the existing commit message to 72-char line wrapping without opening an editor
2525
* `--diff` — Always show diff inside the editor.
2626

2727
By default the diff will be shown unless it's large. The diff will always be shown if --diff is passed, regardless of the size of the diff. (default: `false`)

content/docs/commands/but-skill.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,4 @@ but skill check --global
116116
* `-g`, `--global` — Only check global installations (in home directory)
117117
* `-l`, `--local` — Only check local installations (in current repository)
118118
* `-u`, `--update` — Automatically update any outdated skills found
119+

content/docs/commands/but-stage.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ but stage --branch <branch> # interactive, specific branch
1414
but stage <file-or-hunk> <branch> # direct staging
1515
```
1616

17+
For the interactive hunk picker workflow, see [https://docs.gitbutler.com/gitbutler-tui#stage-hunks-interactively](https://docs.gitbutler.com/gitbutler-tui#stage-hunks-interactively)
18+
1719
**Usage:** `but stage [FILE_OR_HUNK] [BRANCH_POS] [OPTIONS]`
1820

1921
## Arguments
2022

21-
- `<FILE_OR_HUNK>` — File or hunk ID to stage
22-
- `<BRANCH_POS>` — Branch to stage to (positional)
23+
* `<FILE_OR_HUNK>` — File or hunk ID to stage
24+
* `<BRANCH_POS>` — Branch to stage to (positional)
2325

2426
## Options
2527

26-
- `-b`, `--branch` `<BRANCH>` — Branch to stage to (for interactive mode)
28+
* `-b`, `--branch` `<BRANCH>` — Branch to stage to (for interactive mode)
2729

28-
For the interactive hunk picker workflow, see the [TUI guide](/gitbutler-tui#stage-hunks-interactively).

content/docs/commands/but-tui.mdx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,8 @@ title: "`but tui`"
33
description: "Open a live terminal workspace for branches, commits, changes, and diffs."
44
---
55

6-
`but tui` opens the interactive terminal UI for the current GitButler workspace.
6+
The GitButler TUI provides a visual experience similar to the GitButler GUI - right in your
7+
terminal. For the full workflow and key bindings, see [https://docs.gitbutler.com/gitbutler-tui](https://docs.gitbutler.com/gitbutler-tui)
78

8-
Use it when you want a live workspace view in the terminal instead of static CLI
9-
output.
9+
**Usage:** `but tui`
1010

11-
**Usage:** `but tui [OPTIONS]`
12-
13-
## Options
14-
15-
- `-j`, `--json` — Use JSON output format.
16-
17-
For the full workflow and keybindings, see the [TUI guide](/gitbutler-tui).

scripts/update-manpages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ rm -f cli-docs/*
3838

3939
# Regenerate documentation using cargo
4040
echo "Regenerating CLI documentation with cargo..."
41-
cargo run --bin but-clap
41+
cargo run --bin but-clap --features raw-clap-docs
4242

4343
echo "Documentation files regenerated successfully!"
4444
echo

0 commit comments

Comments
 (0)