Skip to main content
wit provides powerful tools for debugging issues in your codebase, understanding file history, and cleaning up your working directory.

Bisect

Binary search through commit history to find the commit that introduced a bug. This is incredibly efficient - even with 1000 commits, you’ll find the culprit in about 10 steps.

Basic Workflow

Commands

Example: Finding a Regression

Viewing Bisect Progress

Skip Untestable Commits

Sometimes a commit can’t be tested (e.g., doesn’t compile):

Tips for Effective Bisecting

Create a script that returns 0 for good, 1 for bad:
Pick a “good” commit you’re confident about (e.g., a release tag) to minimize the search space.
Don’t waste time on commits that won’t compile - just wit bisect skip.

Show

Display detailed information about commits, files at specific commits, and tags.

Show a Commit

Output

Show File at Specific Commit

Show a Tag

Options

Examples

Clean

Remove untracked files from the working directory. This helps clean up build artifacts, temporary files, and other clutter.

Safety First

Clean requires explicit flags to prevent accidental data loss:

Options

Examples

What Gets Cleaned

wit clean -fdx will remove everything not tracked by wit, including node_modules, build outputs, and local config files. Always run with -n first!

Common Use Cases

Combining for Effective Debugging

Debug Workflow Example