but pr
Commands for creating and managing reviews on a forge, e.g. GitHub PRs or GitLab MRs.
If you are authenticated with a forge using but config forge auth, you can use the but pr or but mr commands to create pull requests (or merge requests) on the remote repository for your branches.
Running but pr without a subcommand defaults to but pr new, which will prompt you to select a branch to create a PR for.
Usage: but pr <COMMAND> [OPTIONS]
Subcommands
but pr new
Create a new review for a branch, force-pushing it first.
If the branch is part of a stack, or of a linked worktree, GitButler pushes that branch and its ancestors, including the branches a worktree rests on, and creates missing reviews from the bottom upward. It also updates stack metadata using native GitHub stacks when enabled and supported, or review descriptions otherwise.
Usage: but pr new [BRANCH] [OPTIONS]
Arguments:
<BRANCH>— The branch to create a review for. Without it, a terminal prompts for one (or confirms when only one branch lacks a review); a non-interactive run needs it
Options:
-m,--message<MESSAGE>— Review title and description: the first line is the title, the rest is the description. A non-interactive run needs -m, -F, or -t-F,--file<FILE>— Read review title and description from FILE, or from stdin when FILE is -. The first line is the title, the rest is the description-s,--skip-force-push-protection— Skip force push protection checks--no-hooks— Bypass pre-push hooks-t,--default— Use the default content for the review title and description, skipping any prompts. If the branch contains only a single commit, the commit message will be used (default:false)-d,--draft— Create the review as a draft (default:false)
but pr auto-merge
Enable or disable the automatic merging of reviews
Usage: but pr auto-merge [SELECTOR] [OPTIONS]
Arguments:
<SELECTOR>— One or more comma-separated branch names, branch IDs, stack IDs (every review on the stack), or review numbers (the PR or MR number without the symbol). Without it, a terminal prompts for reviews from the workspace's branches; a non-interactive run needs it
Options:
-d,--off— Disable automatic merging instead of enabling it (default:false)
but pr set-draft
Mark existing reviews as draft
Usage: but pr set-draft [SELECTOR]
Arguments:
<SELECTOR>— One or more comma-separated branch names, branch IDs, stack IDs (every review on the stack), or review numbers (the PR or MR number without the symbol). Without it, a terminal prompts for reviews from the workspace's branches; a non-interactive run needs it
but pr set-ready
Mark existing reviews as ready for review
Usage: but pr set-ready [SELECTOR]
Arguments:
<SELECTOR>— One or more comma-separated branch names, branch IDs, stack IDs (every review on the stack), or review numbers (the PR or MR number without the symbol). Without it, a terminal prompts for reviews from the workspace's branches; a non-interactive run needs it
but pr template
Configure the template to use for review descriptions
Usage: but pr template [TEMPLATE_PATH]
Arguments:
<TEMPLATE_PATH>— Path to the review template file within the repository. Without it, a terminal lists the templates found in the repository to pick from; a non-interactive run needs it
Options
-d,--draft— Create the review as a draft (default:false)
Last updated on