cmd shift dot
If you’re using Finder on a Mac OS, the quickest way to display and hide hidden files is by using the Command + Shift + . (or the period) key combination. This key combination will toggle on and off the hidden files inside the Finder. By the way, this is only applicable if you have the Mac Sierra OS and above. I like the clean look better (without the hidden files), but the Command + Shift + . is pretty handy if you need to quickly look at hidden files.
Finder: Command + Shift + .