dubstack 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/index.js +1654 -308
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,6 +75,9 @@ dub log
|
|
|
75
75
|
git checkout main && git pull
|
|
76
76
|
dub restack
|
|
77
77
|
|
|
78
|
+
# 4b. Sync local stack state with remote branches
|
|
79
|
+
dub sync
|
|
80
|
+
|
|
78
81
|
# 5. Made a mistake? Undo it
|
|
79
82
|
# 5. Made a mistake? Undo it
|
|
80
83
|
dub undo
|
|
@@ -230,6 +233,45 @@ Progress is saved to `.git/dubstack/restack-progress.json`, so the resume picks
|
|
|
230
233
|
|
|
231
234
|
---
|
|
232
235
|
|
|
236
|
+
### `dub sync`
|
|
237
|
+
|
|
238
|
+
Synchronizes tracked stack branches with remote refs and optionally restacks.
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
dub sync
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Useful flags:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# Sync all stacks across trunks
|
|
248
|
+
dub sync --all
|
|
249
|
+
|
|
250
|
+
# Non-interactive safe mode (skip destructive operations)
|
|
251
|
+
dub sync --no-interactive
|
|
252
|
+
|
|
253
|
+
# Force overwrite/delete decisions during sync
|
|
254
|
+
dub sync --force
|
|
255
|
+
|
|
256
|
+
# Skip post-sync restack
|
|
257
|
+
dub sync --no-restack
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Current behavior:
|
|
261
|
+
- Fetches tracked roots and branches from `origin`
|
|
262
|
+
- Attempts fast-forward trunk updates (or overwrite with `--force`)
|
|
263
|
+
- Cleans local branches whose PRs are `MERGED`/`CLOSED` and whose commits are
|
|
264
|
+
confirmed in trunk (interactive/force), while keeping non-cleanable stacks
|
|
265
|
+
excluded from destructive sync actions
|
|
266
|
+
- Reconciles each tracked branch:
|
|
267
|
+
- restores missing local branches from remote
|
|
268
|
+
- fast-forwards branches that are safely behind remote
|
|
269
|
+
- keeps local-ahead branches
|
|
270
|
+
- prompts/skips/forces on diverged branches
|
|
271
|
+
- Runs post-sync restack by default
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
233
275
|
### `dub undo`
|
|
234
276
|
|
|
235
277
|
Rolls back the last `dub create` or `dub restack` operation.
|