Conflict Resolution
Handle conflicts when local and remote Skills have diverged.
When both local and remote versions of a Skill have changes, you'll be prompted to resolve the conflict.
When Conflicts Occur
Conflicts happen when:
- You modified a Skill locally
- Someone else pushed changes to the same Skill
- You try to push or pull without syncing first
Conflict Prompt
When a conflict is detected, you'll see a prompt like this:
⚠️ Conflict detected for skill: my-skill
Local changes:
- Modified: SKILL.md (2 hours ago)
- Modified: script.py (2 hours ago)
Remote changes:
- Modified: SKILL.md (1 hour ago, by teammate@example.com)
Choose an option:
❯ Use local version (overwrite remote)
Use remote version (overwrite local)
Show diff
Skip this skillResolution Options
Use Local Version
Select this to keep your local changes and overwrite the remote:
- Your local files will be pushed to the remote
- The remote version will be replaced
- Teammates will get your version on their next pull
Use Remote Version
Select this to discard your local changes and use the remote:
- Remote files will overwrite your local files
- Your local changes will be lost
- You'll have the same version as the remote
Show Diff
View a detailed comparison of changes before deciding:
Showing diff for: my-skill/SKILL.md
─────────────────────────────────────────
1 | ---
2 | name: my-skill
- 3 | description: Basic operations
+ 3 | description: Advanced operations with extras
4 | ---
5 |
6 | # My SkillAfter viewing the diff, you'll be prompted to choose local or remote.
Skip This Skill
Don't sync this Skill and continue with others:
- The Skill remains unchanged (both local and remote)
- Other Skills will still be synced
- You can resolve this conflict later
Avoiding Conflicts
Pull Before Working
Always pull the latest changes before starting work:
bluebag pullPush Frequently
Push your changes regularly to minimize divergence:
bluebag pushCommunicate with Your Team
Coordinate with teammates when working on the same Skills to avoid simultaneous edits.
Force Options
Force Push
Skip conflict detection and overwrite remote:
bluebag push --forceUse when you're certain your local version should replace the remote.
Force Pull
Skip conflict detection and overwrite local:
bluebag pull --forceUse when you want to discard all local changes.
Recovering from Mistakes
Accidentally Overwrote Remote
If you force-pushed and need to recover the previous remote version:
- Check if a teammate has the previous version
- Have them push it back
- Or restore from your project's backup if available
Accidentally Overwrote Local
If you force-pulled and lost local changes:
- Check your version control (git) for the previous version
- Restore from git:
git checkout -- skills/my-skill/ - If not using git, the changes may be unrecoverable
Best Practice: Use Version Control
Always use git or another version control system with your Skills:
# Before pulling
git add skills/
git commit -m "Save local changes before pull"
# Now safe to pull
bluebag pullThis ensures you can always recover previous versions.