In git, we solve this problem by sticking a .gitignore file in any directories we want to be part of the repo, but without the contents (cache folders, user-generated data destinations, etc.)
I think the author was referencing hg's numerous extensions. In reality I think both git and hg users turn to Google when they get stuck (same for bzr, svn, cvs, and every other scm).
Mercurial: there's an extension for that!
Git: you can fix that just by adding --foo bar:buzz --derp herp to the commandline lol RTFM