How to migrate to a new Mac, including SSH keys and dotfiles? I have an up-to-date 2018 MacBook Pro that I am replacing with a different 2018 MacBook Pro. I'd like to migrate all the content from the first one to the new one, including the SSH keys, all the dotfiles (.gitconfig, .zshrc etc.), PostgreSQL databases, Homebrew-installed packages, and the system and application preferences.

Does macOS Migration Assistant transfer everything from one drive to another? Or does it only look at apps, documents and ignores configuration files?
Yea, macOS Migration Assistant ignores configuration files.