title: Redeploy Google Cloud Function from command line using Source Repositories
body: <p>I have a fairly simply Google Cloud Function that I'm deploying from Cloud Source Repositories.</p>
  
  <p>I'm using the Google Cloud Shell as my development machine.</p>
  
  <p>When I make updates to the function as I'm developing, I use the CLI to push updates to my Source Repository.  However, running the <code>gcloud functions deploy ...</code> command from the command line doesn't seem to <em>force</em> GCF to pull in the latest source.</p>
  
  <p>Occasionally, the <code>deploy</code> command after pushing new source code will simply state "Nothing to update." (which is incorrect.)</p>
  
  <p>More often, it will go through the deployment process but the function will still run the previous version of the code.</p>
  
  <p>When this happens the only way I can get the function to update is to use the dashboard, "Edit" the function, and then hit the Deploy button (even though I didn't change anything.)</p>
  
  <p>Am I forgetting to do some kind of versioning or tagging that is required?  Is there a way to force the CLI to pull the most current commit from the source repo?</p>