Show or Hide hidden files on macOS

By default, files which begin with a dot (e.g. .gitignore) on macOS are hidden from the Finder app. You can however, quickly show or hide these files with a simple Terminal script.

# Show files
$ defaults write com.apple.finder AppleShowAllFiles YES
$ killall Finder

# Hide files
$ defaults write com.apple.finder AppleShowAllFiles NO
$ killall Finder
That's me!

I’m Ajay Karwal. I write about my experiences as a front-end developer. If you enjoy my content, please consider supporting what I do.

Become a PatronBuy me a coffee