Mackup to the Rescue
Rather than setting up complicated/custom scripts, I've found Mackup that saves known application configs and backs them up to a directory.
The default save location is to Dropbox, but it can be customized to save to a custom location. The custom files that you create are also saved to the backup.
Main Folder:
~/Dotfiles/
Location of the backup files:
~/Dotfiles/Mackup/
Github repo of the backup files:
https://github.com/kennyklee/dotfiles
Clone https://github.com/kennyklee/dotfiles
into the home directory.
# Install Mackup
brew install mackup
# Launch it and restore my files
mackup restore
# Install Mackup
brew install mackup
# Configure to the right file location
# https://github.com/lra/mackup/tree/master/doc#file-system
# May have to create the files below manually.
~/.mackup.cfg # custom file
~/.mackup/ # application / directory support
# Launch it and backup my files
mackup backup
Don't forget to git push
in the the 'Dotfiles' folder!!!
There has been number of ideas for managing 'dotfiles' that I've explored in the past.