2 ms·
That's clever, but it also seems like a bit of a hassle. It also seems incredibly non-hermetic and prone to accidental pollution. What about putting all config
by echelon 4y ago
That's clever, but it also seems like a bit of a hassle. It also seems incredibly non-hermetic and prone to accidental pollution.
What about putting all configs into a single git managed directory and using tooling to install the appropriate symlinks?
- hermanradtke 4y agoThe git ignore file set up prevents accidental pollution. A script and/or symlinks is overhead.
- nerdponx 4y ago# Save the repo to `~/.dotfiles`; the `--bare` option prevents Git from making # a mess of your home directory. git clone --bare ... ~/.dotfiles # Set up an alias for this shell session (it's also in ~/.config/aliasrc). alias dots='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' # Make sure we don't show untracked files in `git status` output. dots config --local status.showUntrackedFiles no # Checkout all local files. # NOTE: This might overwrite existing files, or you might need to stash files # before proceeding. Look before you leap. If you have an existing setup, # consider checking out individual files as needed and testing the # configuration piecemeal, instead of doing a complete checkout. dots checkout # Make sure we can access remotes properly. The `--bare` option requires us to # do this manually. dots config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" # Make sure we are set up to track the remote `master` branch. Again, this is a # consequence of cloning with `--bare`. dots branch --set-upstream-to=origin/master master dots switch master # Fetch to make sure everything is configured correctly. dots fetch origin