Skip to main content
wit provides intuitive branch management with automatic stashing when switching branches.

branch

List, create, or delete branches.

Options

Examples

Example Output

The * indicates the current branch.

switch

Switch to a different branch.

Options

Examples

When you switch branches, wit automatically saves your uncommitted changes and restores them when you switch back. No more losing work!

checkout

Git-compatible alias for switching branches and restoring files.

Options

Examples

We recommend using wit switch for branches and wit restore for files, as they make intent clearer. checkout is provided for Git compatibility.

Auto-Stash Feature

One of wit’s best features is automatic stashing when switching branches.

How It Works

  1. When you switch branches with uncommitted changes:
    • wit saves your changes to a branch-specific stash
    • You switch to the new branch with a clean state
  2. When you switch back:
    • wit automatically restores your saved changes
    • You can continue exactly where you left off

Example

Configuration

Auto-stash is enabled by default. You can control it in .wit/config:

Branch Workflow Example