Show system files / Show git ignore in osx

Open the terminal and type

  • on OS X 10.8:

    defaults write com.apple.Finder AppleShowAllFiles TRUE
    
  • on OS X 10.9:

    defaults write com.apple.finder AppleShowAllFiles TRUE
    

Then you must relaunch finder:

killall Finder

Any file name in OS X prefixed with a '.' is considered "hidden".


⌘⇧. will toggle the AppleShowAllFiles setting.

This key combo will work from open/save dialogue boxes in all apps, not just the finder. Use this and you’ll never be confused when on someone else’s Mac or a new Mac, and you can avoid mucking around with defaults write.

I use the nemonic of “use a dot to show a dot file” to remember it, because of hidden dot files in unix.


You can use the shortcut in Finder:

Command + Shift + .

It will show the hidden files. To hide the files again, use the same shortcut.


if you just want to look at them you can always use the command line:

ls -al path/to/dir

If you want to always view all files from the finder you can do:

defaults write com.apple.Finder AppleShowAllFiles YES

If you just want to view a .gitignore from the finder you can:

chflags nohidden /path/to/dir/.gitignore

But youll have to call that command on every .gitignore its not global.


(more recent, for 10.10.2:)

The above commands didn't work for me. I'm using OSX Yosemite: 10.10.2. This worked though:

defaults write com.apple.finder AppleShowAllFiles -boolean true;
killall Finder;

Source: http://www.idownloadblog.com/2014/08/04/how-to-show-hidden-files-folders-finder-mac/