wit provides an improved merge experience with structured conflict resolution.
merge
Merge a branch into the current branch.
Options
Examples
Merge Workflow
Simple Merge (No Conflicts)
Output:
Merge with Conflicts
When conflicts occur:
Output:
Conflict Resolution
View Conflicts
Output:
Unlike Git’s inline markers, wit uses structured JSON for conflicts:
Resolving Conflicts
- Edit the file to fix conflicts
- Mark as resolved:
- Complete the merge:
Abort a Merge
If you want to cancel the merge:
Visual Conflict Resolution
For complex conflicts, use the visual interface:
The web UI provides:
- Side-by-side diff view
- Click to choose “ours” or “theirs”
- Manual editing for custom resolution
- Preview of merged result
Merge Example
Here’s a complete merge workflow:
Undo a Merge
Made a mistake? Just undo it:
This works whether the merge:
- Completed successfully
- Is still in progress
- Has conflicts
Merge Strategies
wit currently supports recursive merge strategy (similar to Git’s default). Additional strategies are planned for future releases.
Tips
Before merging, ensure your branch is up to date:
Don’t use --force unless you really mean it. The undo command is your friend if something goes wrong.