Push branches and create reviews
Publish branches, create pull or merge requests, and land work with the GitButler CLI.
Use but push to publish a branch, but pr to create a review, or but land when your project accepts direct updates to the target branch.
Push a branch
Name the branch you want to push:
Preview the push without changing the remote:
In an interactive terminal, bare but push opens a branch picker. In a non-interactive session, it pushes every branch with unpushed commits, so naming the branch is safer in scripts.
Create a pull or merge request
Authenticate with the repository's forge first:
GitButler supports accounts for GitHub, GitLab, and Bitbucket. The authentication flow offers the methods supported by the selected provider, including self-hosted GitHub and GitLab instances.
Create a review for a branch:
GitButler pushes the branch before creating its pull request or merge request. Use but mr as an alias when you prefer GitLab terminology.
Pass -t to use the default title and description without prompts:
For a stacked branch, name the top branch. GitButler pushes the whole stack and creates missing reviews from the bottom upward:
Manage forge accounts
Show configured accounts and their authentication status:
List accounts or remove one that you no longer use:
Land without a review
If your project accepts direct updates to the target branch, land a branch with:
This bypasses code review and any checks enforced only by your review workflow. GitButler asks for confirmation because the target update isn't easily reversible.
The target fast-forwards when possible; otherwise GitButler creates a merge commit. After landing, GitButler reconciles the remaining applied branches onto the updated target.
If the remote rejects direct pushes because of branch protection, create a review with but pr new instead. See but land for stack and non-interactive options.
Last updated on