brew install chezmoi
chezmoi cd
git init
git remote add origin https://github.com/sunesimonsen/chezmoi.git
git checkout main
git pull
Before you apply the changes, run chezmoi diff to see if it will override anything. Create backups of those files.
Alternatively you can run chezmoi apply and you will be prompted.
chezmoi update
chezmoi re-add
chezmoi cd
git add .
git ci -m "message"
git push