DEV Community

Cover image for Dotfiles Backup using `chezmoi` (MacOS)

Posted on

Dotfiles Backup using `chezmoi` (MacOS)

Install chezmoi

  • Brew
brew install chezmoi
Enter fullscreen mode Exit fullscreen mode
  • Curl
sh -c "$(curl -fsLS"
Enter fullscreen mode Exit fullscreen mode


  • (First time) Create a new repo - $ chezmoi init
  • (First time) Create a github (or gitlab, etc) -
  • Add / Update dot files - $ chezmoi add ~/.zshrc, $chezmoi add ~/.config/neovim, etc
  • CD into local repo - $ chezmoi cd
  • Commit your changes - $ git commit -am "Initial commit"
  • (First time) Add remote origin - $ git remote add origin
  • Push your changes to remote repo - $ git push -u origin main


  • (First time) Clone remote repo - $ chezmoi init
  • Pull and apply the latest changes - $ chezmoi update -v


Top comments (0)