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
dotr deploy --dry-run --profile work --packages nvim,bashrc
318
-
dotr update --dry-run --clean
326
+
327
+
# Preview deploy without cleaning extra files
328
+
dotr deploy --dry-run --clean=false
319
329
```
320
330
321
331
Dry run mode shows what would happen during deploy or update operations without:
322
332
- Creating or modifying any files
323
333
- Creating backups
324
334
- Executing pre/post actions
325
-
- Removing files (when using --clean)
335
+
- Removing extra files (clean operations run by default)
336
+
337
+
## Clean Mode
338
+
339
+
By default, DotR cleans up destination directories by removing files that don't exist in your dotfiles repository. This keeps your configurations synchronized.
340
+
341
+
```bash
342
+
# Deploy with cleaning (default behavior)
343
+
dotr deploy
344
+
345
+
# Deploy without cleaning extra files
346
+
dotr deploy --clean=false
347
+
348
+
# Update with cleaning (default)
349
+
dotr update
350
+
351
+
# Update without cleaning
352
+
dotr update --clean=false
353
+
```
354
+
355
+
**Package-level configuration:**
356
+
```toml
357
+
[packages.nvim]
358
+
src = "dotfiles/nvim"
359
+
dest = "~/.config/nvim/"
360
+
clean = false# Disable cleaning for this package
361
+
```
362
+
363
+
**How it works:**
364
+
- Files in destination that aren't in source are removed during deploy/update
365
+
- Backup files (`.dotrbak` extension) are never removed
366
+
- Files matching ignore patterns are preserved
367
+
- CLI `--clean` flag overrides package-level settings
368
+
- Use `--clean=false` to keep extra files in destination
0 commit comments