GitButler ⧓

GuidesCLI Tutorial

Inspecting changes and branches

Inspect uncommitted changes, commits, and branches with GitButler.

GitButler adds concise views for common workspace tasks, while normal read-only Git commands such as git show, git log, and git blame continue to work.

Inspect the workspace

Start with:

but status

This shows the uncommitted area, applied branches and stacks, commit order, and upstream state. Add -f to include the files in each commit:

but status -f

The first token on each entity line is the CLI ID you can pass to other but commands.

Diff changes

Run but diff without a target to inspect all uncommitted changes:

but diff

Pass one CLI ID to narrow the diff:

but diff q3
but diff user-bookmarks
but diff nn
but diff nn:a

These examples inspect an uncommitted file, a branch, a commit, and one file within a commit. but diff accepts at most one target, so run it again to inspect another entity.

You can still use git diff when you need Git's raw patch format:

git diff HEAD

List branches

Run but branch to show the active branch and the 20 most recently updated branches:

but branch

The list includes useful context such as how far each branch is ahead of the target and whether it merges cleanly into upstream.

Filter branches by a partial name:

but branch list book

Useful filters include:

  • --all to include all branches
  • --local or --remote to limit the source
  • --review to fetch review information
  • --no-ahead and --no-check to skip slower calculations

Inspect a branch

Show the commits on a branch that haven't landed in the target:

but branch show feature-awesome-thing

Add details when you need them:

but branch show feature-awesome-thing --files --review --check

Use --ai to generate a summary of the branch changes:

but branch show feature-awesome-thing --ai

Inspect a commit

Pass a commit's CLI ID or SHA to but show:

but show nn

For a branch, but show <branch> --verbose includes full commit messages and changed files.

Delete a branch

Deleting a branch removes it and its commits from the workspace. Check the branch before deleting work you may still need:

but branch show old-experiment
but branch delete old-experiment

GitButler asks for confirmation when the branch contains unpushed commits.

Last updated on

On this page

Edit on GitHubGive us feedback