I'm a fan of just having my $HOME as a plain git repo with "*" in ~/.gitignore. Having to force add new files is a minor chore but one I'm more than happy to live with.
This makes use of the fact that .gitignore patterns are evaluated in order. It basically makes git only care about dotfiles in the home directory, files under .config, .ssh and .hammerspoon. Specific files/dirs that match that filter can still be ignored (e.g. .bash_history).
This is very straightforward and works quite well, so I don't see the need for yadm anymore. The one issue I have with it, is that in the terminal I'm always in a git context (shown in the shell prompt) in any directory under $HOME.
# 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
* Maintaining per-machine configurations is a hassle, usually involving a lot of manual branch juggling.
* There's no support for storing secrets in a password manager or in encrypted files.
Read more reasons why dotfile managers are better than bare git repos at https://www.chezmoi.io/why-use-chezmoi/#i-already-have-a-sys...