GitButler ⧓

Commands

but rub

Combines two entities together to perform an operation like amend, squash, stage, or move.

Combines two entities together to perform an operation like amend, squash, stage, or move.

Combines two entities together to perform an operation like amend, squash, stage, or move.

The rub command is a simple verb that helps you do a number of editing operations by doing combinations of two things.

For example, you can "rub" a file onto a branch to stage that file to the branch. You can also "rub" a commit onto another commit to squash them together. You can rub a commit onto a branch to move that commit. You can rub a file from one commit to another.

Non-exhaustive list of operations:

│Source │Target ──────┼───────────┼────── Amend │File,Branch│Commit Squash│Commit │Commit Stage │File,Branch│Branch Move │Commit │Branch

Examples

Squashing two commits into one (combining the commit messages):

but rub 3868155 abe3f53f

Amending a commit with the contents of a modified file:

but rub README.md abe3f53f

Moving a commit from one branch to another:

but rub 3868155 feature-branch

Usage: but rub <SOURCE> <TARGET>

Arguments

  • <SOURCE> — The source entity to combine (required)
  • <TARGET> — The target entity to combine with the source (required)

Last updated on

On this page

Edit on GitHubGive us feedback