Docs / Sync & Conflict Resolution
Sync & Conflict Resolution
SlickEnv uses a simple, predictable sync model. Understanding how push and pull work will help you avoid surprises and collaborate smoothly.
The sync model
SlickEnv uses a version-based sync model. Every push creates a new, immutable version. Every pull fetches the latest version (or a specific one). There are no branches, no merge strategies, and no complex resolution algorithms. The model is intentionally simple.
- Each environment has a linear version history
- Versions are immutable. Once created, they cannot be changed
- The latest version is the source of truth for the team
- Rollback creates a new version with the contents of an old one
How push works
When you run slickenv push, the CLI:
- Reads your local .env file
- Fetches the latest remote version
- Compares the two, variable by variable
- If there are no conflicts, creates a new version
- If there are conflicts, prompts you to resolve them
$ slickenv push -m "Added Redis config"
✓ Pushed 15 variables — version 8 created.Conflict detection
A conflict occurs when both you and someone else have changed the same variable since the last shared version. SlickEnv detects this by comparing your local base version against the current remote version.
$ slickenv push
⚠ Conflict detected in 1 variable:
DATABASE_URL
Local: postgres://localhost:5432/myapp_dev
Remote: postgres://prod-db:5432/myapp
? How would you like to resolve?
› Keep local values
Keep remote values
Review one by one
AbortConflicts are detected per-variable, not per-file. If you changed DATABASE_URL and your teammate changed REDIS_URL, there is no conflict, and both changes are merged automatically.
Resolution options
When a conflict is detected, you have four options:
- Keep local values: your local values win for all conflicting variables
- Keep remote values: the remote values win for all conflicting variables
- Review one by one: step through each conflicting variable and choose individually
- Abort: cancel the push entirely, no changes are made
Force push
If you want to skip conflict detection entirely, use the --force flag. This overwrites the remote version with your local .env. Use with caution. This will discard any remote changes that were not in your local file.
$ slickenv push --force
✓ Force pushed 14 variables — version 9 created.