GitButler ⧓

Commands
>_

but amend

Amend uncommitted changes into a commit or branch.

Sources must be uncommitted files or hunks. To move changes that are already committed, or to combine commits, use but squash.

If the target is a branch, the changes are amended into that branch's newest commit (its tip). Name the commit explicitly to amend into anything below the tip.

For more details about CLI IDs, see but help cli-ids.

Usage: but amend [SOURCES] [OPTIONS]

Arguments

  • <SOURCES> — One or more uncommitted files or hunks to amend.

If omitted, all changes in the uncommitted area (zz) are amended.

Options

  • -t, --target <COMMIT_OR_BRANCH> — The commit or branch to amend into (required)
  • --allow-merged — Allow targeting branches and commits that are already merged upstream.

By default, mutations refuse to touch history that has landed in the target branch, since the results tend to conflict on the next but pull.

Last updated on

On this page

Edit on GitHubGive us feedback