You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enhance pull functionality with force options and local change detection
- Added new commands `pull:dev:force` and `pull:prod:force` to allow users to overwrite local changes with platform state.
- Updated the README to reflect the new pull commands and their behavior, including descriptions for preserving or overwriting local changes.
- Implemented logic in the pull process to detect locally changed files and skip them during pulls unless forced, improving user control over resource management.
# Pull platform state (your local changes are preserved)
119
+
npm run pull:dev
117
120
118
-
#Push resolved state
119
-
npm run push:dev
121
+
#See what changed on the platform vs your last commit
122
+
git diff
120
123
121
-
#Clean up the stash
122
-
git stash drop
124
+
#Accept platform changes for a specific file
125
+
git checkout -- resources/tools/some-tool.yml
123
126
```
124
127
125
128
### Selective Push (Partial Sync)
@@ -471,30 +474,24 @@ model:
471
474
472
475
### Sync Workflow
473
476
474
-
The engine uses git's merge capabilities to safely combine local and platform changes:
477
+
Your local files are the source of truth. The engine respects that:
475
478
476
479
```
477
-
┌─────────┐ ┌──────────┐ ┌──────────┐
478
-
│ pull │ ──▸ │ merge│ ──▸ │ push│
479
-
│ platform ││ (git│ │ to │
480
-
│ state│ │ stash/ │ │ platform │
481
-
│ ││ pop) │ │ │
482
-
└─────────┘ └──────────┘ └──────────┘
480
+
pull (default) pull --force push
481
+
───────────── ───────────── ─────────────
482
+
Download from Download from Upload local
483
+
platform, skip platform, overwrite files to
484
+
locally changedeverythingplatform
485
+
files
483
486
```
484
487
485
-
**`pull`** does the heavy lifting:
486
-
1. Detects local uncommitted changes → `git stash`
487
-
2. Downloads fresh platform state (overwrites resource files)
488
-
3. Reapplies local changes on top → `git stash pop`
489
-
4. Git's three-way merge reconciles both sets of changes
490
-
5. If conflicts: leaves standard `<<<<<<<` markers, exits for manual resolution
491
-
6. If clean: working tree has merged files ready to push
488
+
**`pull`** downloads platform state. In default mode (git repo required), it detects locally modified or deleted files and skips them — your local work is preserved. New platform resources are still downloaded. Use `--force` to overwrite everything.
492
489
493
-
**`push`** is the engine — reads local files and syncs them to the platform.
490
+
**`push`** is the engine — reads local files and syncs them to the platform. Deleted files are removed from the platform.
494
491
495
-
**`apply`** is the convenience wrapper — runs `pull` then `push` in sequence. Stops if pull has conflicts.
492
+
**`apply`** is the convenience wrapper — runs `pull` then `push` in sequence.
496
493
497
-
> **Note:** `pull` requires a git repo with at least one commit. Without git, it falls back to a simple overwrite (no merge support).
494
+
> **Note:** The "skip locally changed files" feature requires a git repo with at least one commit. Without git, pull always overwrites (same as `--force`).
0 commit comments