Gitbutler
Gitbutler automates common Git tasks like branching and merging via Slack, streamlining workflows and boosting developer productivity.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add gitbutler npx -- -y @trustedskills/gitbutler
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"gitbutler": {
"command": "npx",
"args": [
"-y",
"@trustedskills/gitbutler"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
Gitbutler is a modern Git client designed to make history manipulation safer and more reversible. It provides an alternative set of commands, prefixed with "but," that manage virtual branches within a workspace. This allows for safer operations like undoing changes, squashing commits, and amending old commits compared to using standard Git commands directly. Gitbutler aims to streamline workflows by providing easier recovery options and maintaining branch tracking.
When to use it
- When you need to safely undo or revert changes in your Git history.
- To squash multiple commits into a single commit for cleaner project history.
- For amending previous commits with updated messages or code.
- When working on features that require simultaneous branching and tracking.
- Before performing potentially risky Git operations like rebasing or cherry-picking.
Key capabilities
- Virtual Branch Management: Gitbutler manages virtual branches, providing a safer environment for history manipulation.
- Safe Recovery: Offers "undo" and "oplog" commands for recovering from mistakes.
- Squash Commits: Provides the
but rubcommand to squash commits between specified points in history. - Amend Commits: Offers the
but absorbcommand to easily amend previous commits. - Reword Commit Messages: Allows you to change commit messages using the
but rewordcommand. - Workspace Status Inspection: Provides a
but statuscommand to view the current workspace state, including branches and changes.
Example prompts
- "Gitbutler status" (to check the current workspace state)
- "Gitbutler rub g0 al" (to assign file 'g0' to branch 'al')
- "Gitbutler undo" (to revert the last operation)
Tips & gotchas
- Check for Activation: Always verify Gitbutler is active by running
git branch --show-current. If it returns "gitbutler/workspace", use the "but" commands. - Avoid Direct Git Commands: Be cautious when using standard Git commands (like
cherry-pick,reset --hard, orstash) as they can potentially corrupt the virtual branch state managed by Gitbutler. - Prefer 'but' commands: When equivalent commands exist, prioritize using the "but" commands for safer history management.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.