This repo contains dotfiles managed using chezmoi.
We will be calling chezmoi, cz for ease of use.
Note: cz is an alias for chezmoi command
- download cz
- use:
chezmoi init git@github.com:war-turtle/dotfiles.git # can use https url if ssh is not setup chezmoi apply
To update all you dotfiles with changes from github repo, do the following
cz cd git pull origin main cz diff # to view what changes will be applied cz -v apply # to write the changes download from github to your dotfiles # -v is verbose flag
cz add <path-to-file/directory> cz cd git add . git commit -m "<commit-msg>" git push origin main cz -v apply
chezmoi edit ~/.zshrc
chezmoi applyIf the file(let's take ~/.zshrc file for example) is already edited by some other program. you can use
chezmoi diff # to view the difference chezmoi merge ~/.zshrc
In the opened vs code window, local files are on the left and files from github are on the right
you can also use merge-all to merge all the file once instead of doing it one by one
cz merge-all
If you decide to do merges one by one and want to check which all files changed use:
cz diff | grep '^+++ '
refer to faqs to read How do I edit my dotfiles with chezmoi?