Manage dotfiles cross platform with chezmoi.
To get started, see the install and quick start
Get a full list of command with chezmoi help
chezmoi add ~/.fileName
chezmoi edit ~/.fileName The edit does not take effect yet.
If you edit the file without chezmoi edit, you can still add it with either:
chezmoi add $fileorchezmoi re-addorchezmoi merge $file
chezmoi diff
chezmoi -v apply
chezmoi cd git add . git commit -m “my commit” git push exit
The exit at the end is used because chezmoi cd open a new shell.
The files are in: /home/user/.local/share/chezmoi
On any machine where chezmoi is installed and init, you can pull and apply the latest changes from your repo with:
chezmoi update -v
Once installed, you can set up a new machine with one line:
chezmoi init –apply $GITHUB_USERNAME
Note: if your repo is not named dotfiles, use the full repo link
or you can use this version if there is element you want to change before applying the dotefiles to a new machine:
chezmoi init https://github.com/$GITHUB_USERNAME/dotfiles.git
chezmoi diff
chezmoi edit $FILE
or merge the file:
chezmoi merge $FILE
chezmoi apply -v
chezmoi update -v