branch
List, create, or delete branches.Options
Examples
Example Output
* 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
Auto-Stash Feature
One of wit’s best features is automatic stashing when switching branches.How It Works
-
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
-
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: