diff --git a/content/docs/commands/but-absorb.mdx b/content/docs/commands/but-absorb.mdx index 3d5b5ff..b66f556 100644 --- a/content/docs/commands/but-absorb.mdx +++ b/content/docs/commands/but-absorb.mdx @@ -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. @@ -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 @@ -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 diff --git a/content/docs/commands/but-branch.mdx b/content/docs/commands/but-branch.mdx index ff87459..6f6210c 100644 --- a/content/docs/commands/but-branch.mdx +++ b/content/docs/commands/but-branch.mdx @@ -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 `.` +can work on it, you can run `but branch apply `. This will apply the changes in that branch into your working directory as a parallel applied branch. diff --git a/content/docs/commands/but-config.mdx b/content/docs/commands/but-config.mdx index 1cce69d..dd097ca 100644 --- a/content/docs/commands/but-config.mdx +++ b/content/docs/commands/but-config.mdx @@ -29,6 +29,10 @@ View/set target branch: but config target +View/set metrics: + + but config metrics + **Usage:** `but config ` @@ -111,3 +115,32 @@ Set target 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:** + +* `` — Whether metrics are enabled + diff --git a/content/docs/commands/but-pick.mdx b/content/docs/commands/but-pick.mdx index b1eedae..72c5b50 100644 --- a/content/docs/commands/but-pick.mdx +++ b/content/docs/commands/but-pick.mdx @@ -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 @@ -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] [TARGET_BRANCH]` +**Usage:** `but pick [TARGET_BRANCH]` ## Arguments -* `` — 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 +* `` — The commit SHA, CLI ID, or unapplied branch name to cherry-pick from (required) +* `` — The target virtual branch to apply the commit(s) to -* `-j`, `--json` — Whether to use JSON output format diff --git a/content/docs/commands/but-pr.mdx b/content/docs/commands/but-pr.mdx index ce4f1fa..80ac2ff 100644 --- a/content/docs/commands/but-pr.mdx +++ b/content/docs/commands/but-pr.mdx @@ -27,6 +27,8 @@ Create a new pull request for a branch. If no branch is specified, you will be p **Options:** +* `-m`, `--message` `` — PR title and description. The first line is the title, the rest is the description +* `-F`, `--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`) diff --git a/content/docs/commands/meta.json b/content/docs/commands/meta.json index f665d10..93bf6e5 100644 --- a/content/docs/commands/meta.json +++ b/content/docs/commands/meta.json @@ -32,6 +32,7 @@ "but-amend", "but-squash", "but-move", + "but-pick", "---Operations Log---", "but-oplog", "but-undo",