What does "brew --HEAD" mean? I've seen it mentioned several times to fix issues with some packages, that it installs newer versions of packages somehow. But I've been unable to find a clear explanation of what that option really does, when to use it, why some packages have a --HEAD version to install and why its necessary.
I found some information in the Homebrew docs.

Quoting from under the "Advanced Formula Tricks" section:


  Unstable versions (HEAD, devel)
  
  Formulae can specify alternate downloads for the upstream project’s devel release (unstable but not trunk) or HEAD
  (master/trunk).
  
  HEAD URLs (activated by passing --HEAD) build the development cutting
  edge.


Hopefully this helps with the what.  I can't help with the why.