# Manage Dotfiles with Stow #typ/Cheatsheet #tool/macos #tool/linux - neat guide for dotfiles: https://nygaard.dev/blog/macos-dotfiles - stow docs: https://www.gnu.org/software/stow/manual/stow.html - stow tutorial: https://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html ## Apply stow files ....to home not containing any config (new machine without stuff installed) Do it for a certain set: ``` stow folder -v ``` Do it for all of them ``` stow * -v ``` ## Setup or update stow Szenarios: - existing machine not yet setup with stow, but with default configs already in place - new program configs you want to add to stow (eg. just install a program) Steps: 1. copy config files to stow directory 2. update stow directory with content of config files in use This is how you update stuff: ``` stow --adopt * -v -v --ignore .DS_Store ``` - `--adopt`copies existing files into dotfiles directory - `-v -v` logs verbosely - `--ignore .DS_Store` obvious If you just want to use your stow files on a new machine 1. clone git repo with your config files 2. run `--adopt` like above and then restore the stow directory with git The symlinks will not break, effectively you update the config files with the ones you brought via a git repo