title: gcloudignore doesn't allow standard wildcard whitelist
body: <p>Gcloudignore works like gitignore in that you can exclude certain files from uploading to GCF. Sometimes when you have really large projects with lots of generated files, it can be useful to exclude all files except a few.</p>
  
  <blockquote>
    <p>.gcloudignore</p>
  </blockquote>
  
  <pre><code># Ignore everything
  # Or /*
  *
  
  # Except the Cloud Function files we want to deploy
  !/package.json
  !/index.js
  </code></pre>
  
  <p>The following gcloudignore file gives us: <code>File index.js or function.js that is expected to define function doesn't exist in the root directory.</code> meaning index.js is ignored and can not be read.</p>
  
  <p>However the following ignore file syntax works just fine to deploy:</p>
  
  <pre><code># Ignore everything
  /[!.]*
  /.?*
  
  # Except the Cloud Function files we want to deploy
  !/package.json
  !/index.js
  </code></pre>
  
  <p>I tried peering into the gcloud program code, but I was wondering if anyone knows why this is the case?</p>