Each repository has its own configuration in .wit/config.
Core Settings
[core]
repositoryformatversion = 1
The repository format version. wit uses version 1 by default.
File Mode
Whether to track file permission changes.
| Value | Description |
|---|
true | Track executable bit changes |
false | Ignore permission changes |
When to disable:
- Windows systems (no execute bit)
- Shared folders with permission issues
Bare Repository
Bare repositories have no working directory (used for servers).
wit-Specific Settings
Hash Algorithm
[wit]
hashAlgorithm = sha1
| Value | Description |
|---|
sha1 | Git-compatible (default) - works with GitHub/GitLab |
sha256 | More secure, but no Git remote compatibility |
wit defaults to SHA-1 for full GitHub/GitLab compatibility. SHA-256 is available for wit-to-wit workflows that don’t need Git remotes.
Auto-Stash on Switch
[wit]
autoStashOnSwitch = true
When enabled:
- Uncommitted changes are saved when switching branches
- Restored automatically when switching back
Large File Handling
[wit]
largeFileThreshold = 2097152
chunkSize = 2097152
| Key | Description |
|---|
largeFileThreshold | Files larger than this are chunked (bytes) |
chunkSize | Size of each chunk (bytes) |
Common values:
| Size | Bytes |
|---|
| 1 MB | 1048576 |
| 2 MB | 2097152 |
| 5 MB | 5242880 |
| 10 MB | 10485760 |
[user]
name = Your Name
email = you@example.com
signingkey = ABC123
| Key | Description |
|---|
name | Your display name for commits |
email | Your email for commits |
signingkey | GPG key for signing (optional) |
Remote Configuration
[remote "origin"]
url = git@github.com:user/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = git@github.com:user/repo.git
| Key | Description |
|---|
url | Repository URL for fetch/push |
fetch | Refspec for fetching |
pushurl | Alternative URL for pushing (optional) |
Multiple Remotes
[remote "origin"]
url = git@github.com:user/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "upstream"]
url = git@github.com:original/repo.git
fetch = +refs/heads/*:refs/remotes/upstream/*
Branch Configuration
[branch "main"]
remote = origin
merge = refs/heads/main
rebase = true
[branch "develop"]
remote = origin
merge = refs/heads/develop
| Key | Description |
|---|
remote | Default remote for this branch |
merge | Default branch to merge from |
rebase | Rebase instead of merge on pull |
Scope Presets
[scope "frontend"]
paths = packages/frontend/
[scope "backend"]
paths = packages/backend/,packages/api/
[scope "docs"]
paths = docs/,*.md,README*
Use with:
AI Configuration
[ai]
enabled = true
model = gpt-4
autoSuggest = false
| Key | Description | Default |
|---|
enabled | Enable AI features | true |
model | AI model to use | gpt-4o |
autoSuggest | Auto-suggest on commit | false |
Web UI Configuration
[web]
port = 3847
openBrowser = true
| Key | Description | Default |
|---|
port | Web UI port | 3847 |
openBrowser | Open browser on start | true |
Editing Configuration
Using Commands
# View
wit config --list
wit config user.name
# Set
wit config user.name "New Name"
wit config --global user.email "new@email.com"
# Unset
wit config --unset user.name
# Edit directly
wit config --edit
Manual Editing
Open .wit/config in your editor:
Example: Complete Configuration
[core]
repositoryformatversion = 1
filemode = true
bare = false
ignorecase = false
[wit]
hashAlgorithm = sha1
largeFileThreshold = 5242880
autoStashOnSwitch = true
chunkSize = 2097152
[user]
name = Alice Developer
email = alice@company.com
[init]
defaultBranch = main
[remote "origin"]
url = git@github.com:company/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "upstream"]
url = git@github.com:opensource/project.git
fetch = +refs/heads/*:refs/remotes/upstream/*
[branch "main"]
remote = origin
merge = refs/heads/main
[branch "develop"]
remote = origin
merge = refs/heads/develop
[scope "frontend"]
paths = packages/frontend/,packages/shared-ui/
[scope "backend"]
paths = packages/backend/,packages/api/,packages/shared/
[ai]
enabled = true
model = gpt-4
[web]
port = 3847
openBrowser = true