I do the majority of my development work on a Mac. As anybody familiar with Mac-based or Linux-based development knows, one accumulates a variety of “hidden” files in ones root directory, many of which are critical for development purposes. Examples:

  • .bashrc – development paths and shell variables
  • .ssh – keys for SSH
  • .m2 – Maven settings
  • .gitconfig – Git settings

The list goes on from there, but you get the basic idea.

Probably THE MOST SINGLE ANNOYING THING about Apple OS updates is the fact that, when you make a major update (like from Mountain Lion to Mavericks), Apple, in their infinite wisdom, removes all of these files and directories from our home folder. Apparently, they think we can’t be trusted to have anything hidden in our home folders, even if we put them there ourselves.

Fortunately, Time Machine backs up all of this, so they aren’t lost. Unfortunately, if you go into Time Machine it doesn’t show them because they’re, well, hidden.

There is, however, a way to allow us to restore hidden files and folders using Time Machine:

  1. Launch a terminal window.
  2. Execute the following pair of commands:
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
    This tells the finder to show hidden files, then reboots it so that they’re displayed.
  3. Go into Time Machine and copy the files back into your home folder
  4. Execute the following pair of commands:
    defaults write com.apple.finder AppleShowAllFiles FALSE
    killall Finder
    This puts finder back the way it originally was.

Perhaps one of these days Apple will realize that they are not, in all cases, smarter than we are.