title: How to trigger a Jenkins Pipeline on Git commit
body: <p>I'm setting up Jenkins pipeline for my .Net Core application. </p>
  
  <p>Jenkins multibranch pipeline build gets trigger on Git commit if I am configuring the checkout SCM in multibranch Pipeline configuration. But multibranch Pipeline build is not getting trigger on git commit if I checkout SCM explicitly inside Jenkins Declarative Pipeline script.</p>
  
  <p>Is there any way to resolve this issue? </p>
  
  <p>Below is the checkout command which I am using inside the script:</p>
  
  <pre><code>checkout([$class: 'GitSCM', branches: [], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanCheckout'], [$class: 'PruneStaleBranch']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'credential-id', url: 'my/git/ssh/url']]])
  </code></pre>