If you go to the command line in Mac OS X and enter:
defaults write com.apple.finder AppleShowAllFiles TRUEAll system files that are usually hidden (e.g. all .git folders) will then be shown by default in the Finder. Hide the system files by executing the same command, but set TRUE to FALSE. Finally, enter:
killall Finderto refresh the Finder.
Mac OS Sierra (and newer versions) have an even easier way to do just this (explained in more detail here): CMD + SHIFT + .
If you press that shortcut in your Finder window, the OS will display all hidden files.