GitButler ⧓

GitButler CLI Cheat Sheet

Essential commands for working with GitButler

Use the GitButler CLI to inspect changes, manage parallel or stacked branches, edit commits, and publish your work.

Setup and Teardown

Switching to and from GitButler branch management

but setup

Switch to GitButler in the current repository

but teardown

Go back to vanilla git branch management

Branch Management

Create and manage parallel and stacked branches

but branch

List all branches available

but branch new [name]

Create a new parallel branch

but branch new [name] --anchor [branch]

Create a new stacked branch from an existing branch

but apply [branch]

Apply (enable) a branch to your working directory

but unapply [branch|id]

Unapply (disable) a branch from your working directory

Remote Operations

Push changes and interact with forges

but push [branch]

Push one branch to its remote

but pull

Update the target and rebase all applied branches

but pr new [branch] -t

Push a branch or stack and create its reviews

but config forge

View and modify forge authentications

Conflict Management

Resolve conflicts in commits

but resolve [commit]

Enter resolution mode for a conflicted commit

Inspection

View your workspace state and changes

but status

Show uncommitted changes, applied branches, and commits

but status -fv

Show committed files, IDs, authors, and timestamps

but diff

Show uncommitted changes and their file and hunk IDs

but show [id]

Show details for a commit or branch

Committing Changes

Create commits on your branches

but commit -b [branch] -m "[message]"

Commit all uncommitted changes; create the branch if needed

but commit -b [branch] -m "[message]" [change-id]...

Commit selected files or hunks from but diff

Operations Log

View and restore workspace history

but undo

Undo the last operation

but oplog

Show operation history of workspace

but oplog restore [oplog-sha]

Restore workspace to a specific snapshot

Helper Commands

Open GitButler and configure terminal integrations

but gui

Open the GUI to the current project

but alias

Create and manage aliases for commonly used commands

but config

View and modify GitButler configuration settings

GitButler CLI Cheat Sheet | GitButler Docs