but

Manage commits, branches, stacks, and pull requests with the GitButler CLI.

1|Updated May 25, 2020
One-click install
npx skills add https://github.com/titaneric/dotfiles --skill but-titaneric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: but
Source: https://github.com/titaneric/dotfiles/tree/main/dot_agents/skills/gitbutler
Command: npx skills add https://github.com/titaneric/dotfiles --skill but-titaneric

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with GitButler's parallel-branch workspace model breaks traditional git habits: git write commands corrupt the workspace, and agents struggle with selective hunk commits, stacked branches, and history edits. This Skill teaches the correct but CLI workflows so version control operations stay safe and consistent. ## Core Features & Use Cases - Selective Commits: Commit specific dirty files or individual hunks by CLI ID using but diff and but commit --changes, including one-command branch creation with -c. - History Editing: Amend, squash, reorder, split, and uncommit changes with but amend, but squash, but move, and but uncommit, with rules for handling rewritten commit IDs. - Stacked Branches & PRs: Stack or unstack branches with but move, resolve conflicts via but resolve, and create stack-aware pull requests with but pr new. - Use Case: You have a dirty working tree mixing two unrelated changes. Run but diff to get file and hunk IDs, then chain two but commit calls with --changes to produce two clean, ordered commits on a new branch. ## Quick Start Ask the agent to inspect uncommitted changes with but diff and commit only the selected files to a new branch using the GitButler CLI.

Frequently Asked Questions about but

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I commit only specific files or hunks with GitButler?

Run but diff to list uncommitted changes with file and hunk IDs, then pass them to but commit with --changes as comma-separated IDs. A hunk ID uses the form <file-id>:<hunk-id>, such as qs:5, and is not a line range.

How do I stack one GitButler branch on top of another?

Use but move <branch-name> <target-branch-name> with full branch names or branch CLI IDs to stack an existing branch onto another. To unstack, run but move <branch-name> zz, which tears the branch off into its own stack.

Can I use git commit or git rebase in a GitButler workspace?

No, git write commands like commit, checkout, rebase, merge, and stash break the GitButler workspace model and must be replaced with but equivalents. Read-only git commands such as git log, git blame, and git show remain safe to use.

Why does a file stay uncommitted after but commit succeeds?

This indicates a dependency lock: the file was originally committed on another branch, so it cannot be committed on your current branch. Stack your branch onto the owning branch with but move, then commit the file again.

How do I create a pull request for stacked branches in GitButler?

Run but pr new <top-branch-id> -t, which pushes the branch and creates reviews for it and its dependencies in stack order. Stacked PRs must go through but pr so bases and stack footers stay correct; gh pr create loses that metadata.