Git Integration
Stib isolates each card's code changes using Git worktrees. When a card enters an active column, it gets its own dedicated worktree and branch — keeping changes separate from your main branch and from other cards.
Enabling Git Worktrees
To use Git integration, your project must point to a Git repository. When creating a card, check the Use Worktree option (only visible for Git projects). Stib will then create a dedicated worktree and branch for that card.
Worktrees are stored at:
{project-repo-path}/.stib-worktrees/card-{id}TIP
Each worktree is a full working copy of your repository, so agents can read and modify files without affecting the main branch.
Automatic Branch Naming
Stib generates a branch name from the card title and card ID. It detects conventional commit prefixes and uses them as the branch path.
| Card Title | Generated Branch |
|---|---|
fix: auth token expiry | fix/card-{id}-auth-token-expiry |
feat add dark mode | feat/card-{id}-add-dark-mode |
refactor: cleanup utils | refactor/card-{id}-cleanup-utils |
Add search feature | feat/card-{id}-add-search-feature |
Supported prefixes: fix, feat, chore, refactor, docs, test, perf, ci, build, style, revert, hotfix
Prefix detection rules:
- Case-insensitive matching
- Prefix must be followed by a colon (
:) or a space —fix: bugandfix bugboth work - If no recognized prefix is found,
feat/is used as the default
The remainder of the title is slugified: lowercased, accents removed, non-alphanumeric characters replaced with hyphens, and truncated to 50 characters at the nearest hyphen. If the slug is empty after processing, the branch is simply {prefix}/card-{id}.
Custom Branch Names
You can override the auto-generated branch name by entering a custom branch name in the card creation modal. This field appears when Use Worktree is enabled.
The placeholder shows an auto-generated branch preview based on your title. The final branch name will also include the card ID (e.g., card-{id}) which is added by the server.
INFO
Custom branch names are useful for matching existing branches in your repository or following team naming conventions.
Worktree-Eligible Columns
Not all columns trigger worktree creation. Only active column types use worktrees:
| Column Type | Worktree Active | Examples |
|---|---|---|
| passive | No | Backlog, Done |
| conversational | Yes | Plan |
| dev | Yes | Dev |
| skill | Yes | Code Review, Test, PR |
INFO
Conversational columns are worktree-eligible so that plan sessions run inside the worktree. This means work context is preserved when a card moves from a plan column to a dev column.
Viewing Diffs
The agent panel includes a Diff tab that shows all file changes made by the agent in the card's worktree.
| Element | Description |
|---|---|
| File status badges | Modified, Added, or Deleted |
| Syntax highlighting | Per file type (TypeScript, Rust, SQL, JSON, etc.) |
| Hunk headers | Line number ranges for each change block |
| Color-coded lines | Green for additions, red for deletions, gray for context |
The diff includes both tracked changes (staged and committed) and new untracked files. Untracked files larger than 1 MB are skipped to prevent memory issues.
TIP
The Diff tab is available on dev and skill columns (such as Code Review). Click a file header to collapse or expand its changes. Conversational columns (e.g., Plan) have an active worktree but do not display the Diff tab.
Worktree Lifecycle
| Event | What Happens |
|---|---|
| Created | When a card first moves to a worktree-eligible column |
| Maintained | Across movements between active columns |
| Cleaned up | When the card reaches Done or is deleted |
| Re-created | If a card moves back from Done to an active column — the existing branch is reused |
Uncommitted Changes Guard
Stib prevents moving a card that has uncommitted changes in its worktree. This ensures no code is accidentally lost during column transitions.
WARNING
Force-moving a card bypasses this check. Uncommitted changes in the worktree will not block the move when force is used.
Bulk Worktree Cleanup
Use the Clean All action on a column to remove all worktrees and branches for cards in that column at once.
WARNING
This action deletes both the worktrees and their associated branches. It cannot be undone.