mise dotfiles rollback
- 用法:
mise dotfiles rollback [FLAGS] [PATH]… - 效果: 具有破坏性 — 可能删除或不可逆地覆盖
- 源代码:
src/cli/dotfiles/rollback.rs
将文件恢复到检查点所保存的版本
Without --to, each path returns to its most recent saved version that differs from what is on disk; other checkpoints do not affect the choice. With --to REF, the named checkpoint is the source, and --all restores everything it covers. mise saves the current state in a checkpoint first, so mise dot undo can reverse the rollback.
参数
[PATH]…— 要回滚的路径(文件或目录)
Flags
--to <REF>— The checkpoint to roll back to: numeric ID,latest,latest~N, orcommit:<sha>--all— With--to, restore everything the checkpoint covers-n --dry-run— Show the plan without changing anything-y --yes— Apply without prompting--force— Replace a path whose type changed (file, symlink, directory)-h --help— Print help
Examples
Restore the latest saved version that differs from the file
mise dot rollback ~/.config/hypr/bindings.luaRestore ~/.zshrc as checkpoint 42 holds it
mise dot rollback ~/.zshrc --to 42Preview restoring every file from three checkpoints ago
mise dot rollback --to latest~3 --all --dry-run