Conflict Resolution
Learn how to handle sync conflicts when the same data is modified on multiple devices.
What Are Conflicts?
Simple explanation:
Conflict = Same item changed on 2+ devices
Example:
Device A: Changed port 22 → 2222
Device B: Changed port 22 → 2200
Which is correct? = Conflict!
When Conflicts Happen
Common Scenarios
Simultaneous editing:
10:00 AM Device A: Edit "production" host
10:01 AM Device B: Edit "production" host
10:02 AM Sync: Conflict detected!
Both changed same host
Before syncing with each other
Offline changes:
Day 1: Device A offline, makes changes
Day 2: Device B online, makes changes
Day 3: Device A comes online
Syncs: Conflicts!
Quick succession:
Device A: Change → Sync
Device B: Change (before A syncs) → Sync
Result: Conflict
Conflict Detection
Automatic Detection
Xermius detects conflicts:
✓ Same item ID
✓ Both modified
✓ Different values
✓ Since last sync
Notification appears:
"Conflict detected in 1 host"
Conflict Indicators
In app:
⚠️ Icon on conflicted item
Host List:
┌────────────────────────────────────┐
│ ⚠️ production-server │
│ Conflict needs resolution │
│ [Resolve] │
└────────────────────────────────────┘
Resolution Strategies
1. Newest Wins (Default)
Automatic:
Strategy: Use most recent change
When: Conflict detected
Action: Keeps newest version
Discards older
Example:
Device A: Changed 10:00 AM
Device B: Changed 10:01 AM
Result: Device B wins (newer)
Fast, automatic, no input needed
Configuration:
Settings → Sync → Conflicts
Resolution Strategy:
● Newest wins (automatic)
○ Manual resolution
○ Device priority
○ Always merge
[Save]
2. Manual Resolution
Interactive:
Conflict Detected:
┌────────────────────────────────────┐
│ Resolve Conflict │
├────────────────────────────────────┤
│ Host: production-server │
│ │
│ Device A (MacBook) - 10:00 AM │
│ Port: 2222 │
│ User: admin │
│ Modified: Port only │
│ │
│ Device B (Desktop) - 10:01 AM │
│ Port: 22 │
│ User: deploy │
│ Modified: Port and User │
│ │
│ Choose resolution: │
│ ○ Use Device A version │
│ ● Use Device B version │
│ ○ Merge both changes │
│ ○ Keep both (duplicate) │
│ │
│ [Cancel] [Resolve] │
└────────────────────────────────────┘
Review changes:
Side-by-side comparison:
Field Device A Device B
────────────────────────────────────
Port 2222 22
User admin deploy
Host same same
Created same same
3. Device Priority
Always prefer one device:
Settings → Sync → Conflicts
Device Priority:
Primary Device:
[MacBook Pro ▼]
On conflict:
MacBook Pro always wins
Desktop version discarded
Consistent behavior
No manual intervention
4. Always Merge
Combine changes:
Strategy: Merge both versions
When: Fields don't overlap
Example:
Device A: Changed Port
Device B: Changed User
Result: Both changes applied
Port from A, User from B
Only works for different fields
Resolution Process
Step 1: Notification
Sync completes:
⚠️ 1 conflict detected
Click notification:
Opens conflict resolver
Step 2: Review
View both versions:
- What changed?
- When changed?
- By which device?
Understand difference
Step 3: Choose
Decision options:
1. Keep A
2. Keep B
3. Merge
4. Keep both
Select best option
Step 4: Apply
Click "Resolve"
Resolution applied:
- Locally
- Synced to cloud
- Pushed to all devices
Conflict resolved ✓
Conflict Types
Host Conflicts
Example:
Conflict: production-server
Changes:
Device A: Port 2222
Device B: User changed
Resolution:
Merge: Port from A, User from B
Snippet Conflicts
Example:
Conflict: deploy-script
Changes:
Device A: Updated command
Device B: Added variable
Resolution:
Merge or choose newer
Settings Conflicts
Example:
Conflict: Terminal font
Changes:
Device A: Monaco 14pt
Device B: Menlo 16pt
Resolution:
Choose preferred
Deletion Conflicts
Special case:
Device A: Deleted item
Device B: Modified item
Options:
○ Keep deleted (remove)
○ Keep modified (restore)
○ Create new item
Choose carefully!
Preventing Conflicts
Best Practices
1. Sync frequently:
Settings → Sync
Frequency: Every 5 minutes
More syncs = Fewer conflicts
Changes propagate quickly
2. One device at a time:
Sequential editing:
1. Device A: Make changes
2. Device A: Sync ✓
3. Device B: Refresh
4. Device B: Make changes
5. Device B: Sync ✓
No conflicts!
3. Manual sync before editing:
Before making changes:
1. Click "Sync Now"
2. Wait for complete
3. Now edit safely
4. Sync after done
Always have latest
4. Check sync status:
Before switching devices:
1. Check sync indicator
2. Green ● = Synced
3. Safe to switch
Yellow/Red = Wait
5. Use device priority:
For single user:
Set primary device
Always wins conflicts
Predictable behavior
Complex Scenarios
Three-Way Conflicts
Multiple devices:
Device A: Changed X
Device B: Changed Y
Device C: Changed Z
Resolution:
Newest wins (C)
or
Merge all changes
or
Manual per-device
Chain Conflicts
Sequential:
1. A conflicts with B
2. Resolve to A
3. A conflicts with C
4. Resolve to C
5. Final: C wins
Multiple conflicts possible
Resolve one by one
Partial Merges
Field-level:
Host has 10 fields
5 changed on A
3 changed on B
2 overlap = Conflict
Resolution:
Merge non-overlapping (6 fields)
Manual for overlapping (2 fields)
Conflict History
View Past Conflicts
Settings → Sync → Conflicts
Conflict History:
┌────────────────────────────────────┐
│ Jan 17, 10:45 │
│ Host: production-server │
│ Resolved: Merged both │
│ [View Details] │
│ │
│ Jan 15, 14:20 │
│ Snippet: deploy-script │
│ Resolved: Device B won │
│ [View Details] │
│ │
│ Jan 12, 09:30 │
│ Settings: Terminal font │
│ Resolved: Manual (Device A) │
│ [View Details] │
└────────────────────────────────────┘
[Export History] [Clear History]
Conflict Statistics
Last 30 Days:
Total Syncs: 1,247
Conflicts: 3 (0.24%)
Auto-resolved: 2
Manual: 1
Conflict Rate: Very low
Sync Health: Excellent ✓
Advanced Options
Custom Resolution Rules
Advanced → Conflict Rules
Rules:
1. Hosts: Always newest
2. Snippets: Always merge
3. Settings: Device priority
Per-type configuration
Fine-grained control
Conflict Notifications
Notification Settings:
[✓] Notify on conflict
[✓] Play sound
[✓] Show desktop notification
[ ] Email notification
Priority:
● High (immediate)
○ Normal
○ Low
[Save]
Backup Before Resolve
Safety:
[✓] Auto-backup before resolving
Keeps both versions
Can restore if mistake
Recommended: Keep enabled
Troubleshooting
Conflicts Keep Happening
Solutions:
1. Increase sync frequency
2. Use device priority
3. Single-device editing
4. Check network stability
5. Review conflict pattern
Can't Resolve Conflict
If stuck:
1. Export both versions
2. Delete conflicted item
3. Create fresh item
4. Import merged data
5. Sync new item
Manual workaround
Wrong Version Kept
Undo:
1. Settings → Sync → History
2. Find conflict resolution
3. View other version
4. Manually restore
5. Re-sync
Or:
Restore from backup
(if enabled)
Best Practices
1. Configure Strategy
Choose one strategy:
- Newest wins (fast)
- Manual (control)
- Device priority (consistent)
Stick with it
Predictable results
2. Review Conflicts
Don't auto-resolve blindly:
□ Review what changed
□ Understand why
□ Choose wisely
□ Learn patterns
Prevent future conflicts
3. Document Resolutions
For important conflicts:
- Screenshot both versions
- Note why chosen
- Record date/time
- Keep in notes
Audit trail
4. Test Resolution
After resolving:
1. Verify on all devices
2. Check item works
3. Test connections
4. Confirm correct
Don't assume!
5. Regular Cleanup
Monthly:
□ Review conflict history
□ Check patterns
□ Adjust strategy
□ Clear old history
Maintain healthy sync
Next Steps
- 📖 Sync Overview - How sync works
- ⚙️ Setup Sync - Enable sync
- 🔧 Troubleshooting - Fix issues
- 🔐 Security - Sync security