Hidden files

To always show hidden files in Finder on MacOS.

Terminal

Run the following command in your Terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE

Afterwards type in Terminal:

killal Finder

This shuts down and relaunches finder with this new setting enabled. Now you see them dotfiles!

Finder

To quickly toggle hidden folders on or off while in Finder, you can use the keyboard shortcut:

Cmd + Shift + .