Overview
In a monorepo, you often only care about one package or service. Scopes limit all wit operations to the paths you specify.Commands
View Current Scope
Set Scope
Use Preset
Clear Scope
Configuration
Define presets in.wit/config:
Effect on Commands
When a scope is set, these commands are affected:| Command | Effect |
|---|---|
status | Only shows scoped files |
add . | Only stages scoped files |
log | Only shows commits affecting scoped paths |
diff | Only shows changes in scoped files |
commit | Commits all staged files (scope affects staging) |
blame | Works on any file (not affected) |
Example Monorepo Structure
Working on Frontend
Using Presets
Use Cases
Focus During Development
Scoped Commits
Scoped History
CI/CD Pipelines
Tips
Limitations
- Scopes are session-based (not persisted)
- Some commands ignore scopes (e.g.,
branch,switch) - Scopes don’t affect file system operations