title: How to do gsutil cp -R while ignoring files like .git, .gitignore?
body: <p>I am trying to automate the process of syncing my web assets with Google Cloud Storage. I basically need to copy everything in my development directory up to the cloud. However, I need to ignore the <code>.git</code> directory and some other irrelevant files.</p>
  <p>I can't just do a <code>gsutil cp -R . &lt;dest&gt;</code> because that takes absolutely everything, including <code>.git</code>.
  I tried <code>find . | fgrep git | gsutil cp -I &lt;dest&gt;</code> but that flattens all directories and puts them in root!</p>
  <p>Is there a way I can solve this with <code>gsutil</code> or do I have to do a loop in script which uploads all directories (except <code>.git</code>) with <code>-R</code> and then uploads individual files in current directory?</p>