hide .git and add 3rd param on preg_match_all to prevent warning msg