Stow symlinks a central config directory into place; nothing is copied, so editing ~/.zshrc edits the repository file.
| |
Each package mirrors the target:
| |
| |
Exact structure: zsh/zshrc links nothing, zsh/.zshrc does. Preview with a dry run:
| |
What it links in .config
nvim/.config/nvim/init.lua in the repository makes stow nvim produce:
| |
Stow links nvim inside .config, not .config itself, avoiding an existing directory; with ~/.config absent it may link all of it.
To force targeting .config, restructure and say so:
| |
| |
-t targets any other destination, e.g. bin/ to ~/scripts:
| |
Conflicts and adoption
An existing target makes Stow refuse rather than overwrite: move it aside, or let Stow move it into the repository:
| |
--adopt is convenient once, dangerous run blindly: it overwrites the repository copy with the home directory version.
Undoing
| |
Deleting the symlink by hand is equivalent; the repository file is untouched, and Stow only creates symlinks. Check first: rm deletes files as readily as links:
| |
stow -D is safer when many links exist and you do not know which Stow created.
Multiple machines
Layout: a shared base plus per-machine packages:
| |
| |
common always applies, the machine package only where it exists; OS variation goes in separate packages, not conditionals in one file. .stow-local-ignore excludes files from a package when some should not be linked.