mise dotfiles save
- 用法:
mise dotfiles save [FLAGS] [PATH]… - 效果: 修改状态
- 源代码:
src/cli/dotfiles/save.rs
立即保存已跟踪文件的检查点
Exits non-zero when history cannot save or a named path is not tracked. With no changes since the latest checkpoint, nothing is saved unless you pass --description, --label, --task, or a --trigger other than save.
--best-effort turns a failure to write the checkpoint, such as missing Git, into a warning for update scripts that run under set -e. A disabled history or an untracked path still fails.
A save re-encrypts the files it captures to the current [history.encryption] recipients. --re-encrypt also re-encrypts the encrypted files it does not capture: files with autosave = false that it does not name, and variants for other platforms. It re-encrypts their saved versions and saves no unsaved edit. Run it after changing recipients so a machine added to the list can read every file. This machine must be able to unlock each one; otherwise nothing is saved and the error lists each file it cannot unlock.
参数
[PATH]… — 要保存的路径;每个路径都必须已被跟踪
Flags
-d --description <TEXT>— A description for the checkpoint--trigger <TRIGGER>— Record the checkpoint as a save, agent, or update checkpointDefault:
save--task <ID>— The ID of the task an agent is working on, recorded with the checkpoint--label <LABEL>— A label to find the checkpoint by later--best-effort— Warn instead of failing when the checkpoint cannot be written--re-encrypt— Re-encrypt every saved encrypted file to the current recipients-h --help— Print help
Examples
Save every tracked file that changed
mise dot saveSave one file with a description
mise dot save ~/.zshrc -d "before the theme change"Warn instead of failing in a script
mise dot save --best-effortRe-encrypt every encrypted file after changing recipients
mise dot save --re-encrypt