Special files
All files in the source directory whose name begins with . are ignored by
default, unless they are one of the special files listed here. All of these
files are optional and are evaluated in a specific order.
-
.chezmoirootis read from the root of the source directory before anything other file, setting the source state path. The location of all other files, except.chezmoiversion, is relative to the source state path. -
.chezmoi.$FORMAT.tmplis used bychezmoi initto prepare or update the chezmoi config file. This is also used when the command supports the--initflag, such aschezmoi apply --init. This will be applied prior to any remaining special files or directories. -
Data files (
.chezmoidata.$FORMATfiles or files in.chezmoidata/directories) are read before any templates are processed so that data contained within are available to the templates. -
.chezmoitemplates/directories are made available for use in source templates. -
.chezmoiignoredetermines files and directories that should be ignored. -
.chezmoiremovedetermines files that should be removed during an apply. -
External sources (
.chezmoiexternal.$FORMATor files in.chezmoiexternals/) are read in lexical order to include external files and archives as if they were in the source state. -
.chezmoiversionis processed before any operation is applied, to ensure that the running version of chezmoi is new enough.