Backing up dotfiles with chezmoi
On Bluefin, chezmoi is installed by default. But it can be installed using brew
brew install chezmoi
BEFORE YOU BEGIN: Before getting started, create a github repo called dotfiles
- Initialize chezmoi
chezmoi init
- Add a dotfile that you want to manage with chezmoi
chezmoi add ~/.bashrc
- When editing the file, use chezmoi
chezmoi edit ~/.bashrc
- Apply changes
1chezmoi -v apply
NOTE: you can view differences with chezmoi diff
chezmoi cd
git add .
git commit -m "Initial commit"
git remote add origin [email protected]:$GITHUB_USERNAME/dotfiles.git
git branch -M main
git push -u origin main