apply [target...]
Ensure that target... are in the target state, updating them if necessary. If no targets are specified, the state of all targets are ensured. If a target has been modified since chezmoi last wrote it then the user will be prompted if they want to overwrite the file.
Common flags
-x, --exclude types
Exclude target state entries of specific types. The default is
none.
Types can be explicitly included with the --include flag.
Example
--exclude=scripts will cause the command to not run scripts and
--exclude=encrypted will exclude encrypted files.
-i, --include types
Include target state entries of specific types. The default is all.
Types can be explicitly excluded with the --exclude flag.
Example
--include=files specifies all files.
--init
Regenerate and reload the config file from its template before computing the target state.
-P, --parent-dirs
Execute the command on target and all its parent directories.
-r, --recursive
Recurse into subdirectories.
Enabled by default. Can be disabled with --recursive=false.
--source-path
Specify targets by source path, rather than target path. This is useful for applying changes after editing.
Examples
chezmoi apply
chezmoi apply --dry-run --verbose
chezmoi apply ~/.bashrc