title: Can you use 'checkout scm' to get the git commit without actually checking out the repository?
body: <p>I'm using a scripted pipeline in Jenkins and trying to retrieve the commit that triggered the build. I'm currently using 'checkout scm' in my Jenkinsfile but I'm looking for a way to get the commit without actually checking out the repository as it can be quite large!</p>
  <p>Is there a way to do this? Thanks</p>