Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions content/docs/commands/but-absorb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Amends changes into the appropriate commits where they belong.

The semantic for finding "the appropriate commit" is as follows:

- Changes are amended into the topmost commit of the leftmost (first) lane (branch)
- If a change has a dependency to a particular commit, it will be amended into that particular commit
- If a change is staged to a particular lane (branch), it will be amended into a commit there
- If there are no commits in this branch, a new commit is created
- If a change has a dependency to a particular commit, it will be amended into that particular commit
- Changes are amended into the topmost commit of the leftmost (first) lane (branch)

Optionally an identifier to an Uncommitted File or a Branch (stack) may be provided.

Expand All @@ -22,6 +22,8 @@ Optionally an identifier to an Uncommitted File or a Branch (stack) may be provi

If --dry-run is specified, no changes will be made; instead, the absorption plan (what changes would be absorbed by which commits) will be shown.

If --new is specified, new commits will be created for absorbed changes instead of amending existing commits.

**Usage:** `but absorb [SOURCE] [OPTIONS]`

## Arguments
Expand All @@ -31,4 +33,5 @@ If --dry-run is specified, no changes will be made; instead, the absorption plan
## Options

* `--dry-run` — Show the absorption plan without making any changes
* `-n`, `--new` — Create new commits, instead of amending existing ones. This is useful when you want to preserve existing commits and add new ones for the absorbed changes

2 changes: 1 addition & 1 deletion content/docs/commands/but-branch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ You can also choose to fetch and display review information, show files modified
Apply a branch to the workspace

If you want to apply an unapplied branch to your workspace so you
can work on it, you can run `but branch apply <branch-name>`.`
can work on it, you can run `but branch apply <branch-name>`.

This will apply the changes in that branch into your working directory
as a parallel applied branch.
Expand Down
33 changes: 33 additions & 0 deletions content/docs/commands/but-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ View/set target branch:

but config target

View/set metrics:

but config metrics


**Usage:** `but config <COMMAND>`

Expand Down Expand Up @@ -111,3 +115,32 @@ Set target branch:

* `<BRANCH>` — New target branch to set (e.g., "origin/main")

### `but config metrics`

View or set metrics collection.

GitButler uses metrics to help us know what is useful and improve it. Privacy policy: https://gitbutler.com/privacy

Without arguments, displays the current setting.

Examples

View metrics configuration:

but config metrics

Enable metrics:

but config metrics enable

Disable metrics:

but config metrics disable


**Usage:** `but config metrics [STATUS]`

**Arguments:**

* `<STATUS>` — Whether metrics are enabled

20 changes: 8 additions & 12 deletions content/docs/commands/but-pick.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ description: "Cherry-pick a commit from an unapplied branch into an applied virt

Cherry-pick a commit from an unapplied branch into an applied virtual branch.

This command allows you to pick individual commits from unapplied branches and apply them to your current workspace branches.
This command allows you to pick individual commits from unapplied branches
and apply them to your current workspace branches.

The source can be:

- A commit SHA (full or short)
- A CLI ID (e.g., "c5" from `but status`)
- An unapplied branch name (shows interactive commit selection)

If no target branch is specified:

- In interactive mode: prompts you to select a target branch
- If only one branch exists: automatically uses that branch
- In non-interactive mode: fails with an error
Expand All @@ -25,29 +24,26 @@ If no target branch is specified:

Pick a specific commit into a branch:

```bash
```text
but pick abc1234 my-feature
```

Pick using a CLI ID:

```bash
```text
but pick c5 my-feature
```

Interactively select commits from an unapplied branch:

```bash
```text
but pick feature-branch
```

**Usage:** `but pick [OPTIONS] <SOURCE> [TARGET_BRANCH]`
**Usage:** `but pick <SOURCE> [TARGET_BRANCH]`

## Arguments

* `<SOURCE>` — The commit SHA, CLI ID, or unapplied branch name to cherry-pick from
* `[TARGET_BRANCH]` — The target virtual branch to apply the commit(s) to

## Options
* `<SOURCE>` — The commit SHA, CLI ID, or unapplied branch name to cherry-pick from (required)
* `<TARGET_BRANCH>` — The target virtual branch to apply the commit(s) to

* `-j`, `--json` — Whether to use JSON output format
2 changes: 2 additions & 0 deletions content/docs/commands/but-pr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Create a new pull request for a branch. If no branch is specified, you will be p

**Options:**

* `-m`, `--message` `<MESSAGE>` — PR title and description. The first line is the title, the rest is the description
* `-F`, `--file` `<FILE>` — Read PR title and description from file. The first line is the title, the rest is the description
* `-f`, `--with-force` — Force push even if it's not fast-forward (defaults to true) (default: `true`)
* `-s`, `--skip-force-push-protection` — Skip force push protection checks
* `-r`, `--run-hooks` — Run pre-push hooks (defaults to true) (default: `true`)
Expand Down
1 change: 1 addition & 0 deletions content/docs/commands/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"but-amend",
"but-squash",
"but-move",
"but-pick",
"---Operations Log---",
"but-oplog",
"but-undo",
Expand Down