Getting Started
Basic overview
Use
gitto version files and directories present in$HOMEfolder, henceforth calleddotfiles.Use chezmoi to manage all the workflows involved.
Use chezmoi’s templates to handle machine specific configuration.
Update workflow
See the chezmoi’s terms section for explanations of any terms below.
Use
cd $(chezmoi source-path)to navigate to the source directory.This is currently
$HOME/.local/share/chezmoi.Use
chezmoi edit $HOME/<target>to edit the corresponding<target>as present in the source directory.Use a git branch for significant changes to source state
git branch -b updateschezmoi diffto see what will changechezmoi applyto update destination state in$HOMEgit checkout masterto reset everything back in case of disaster.
Use
-n|--dry-runand-v|--verboseafterchezmoiin the above commands if scared.For any of the symlinks,
chezmoi dump ~/<target>to see whatchezmoiis modelling it as. eg:$ chezmoi dump ~/.bash_profile [ { "type": "symlink", "sourcePath": "/home/vvnraman/.local/share/chezmoi/symlink_dot_bash_profile", "targetPath": ".bash_profile", "template": false, "linkname": "dot-bash/bash_profile" } ]
Avoid using this for non-symlinks, as the output is either json or yaml and not human readable.