title: Git command to checkout latest commit from develop branch
body: <p>Using groovy syntax in Jenkins pipeline, below is the syntax used for check out:</p>
  
  <pre><code>         git branch: branchName, 
                         credentialsId: credential, 
                         url: "${gitLabServer}/${projectName}/${repo}.git"
  </code></pre>
  
  <p>Where <code>credential</code> is jenkins credential(<code>111111-222222-33333-44444</code>) shown below:</p>
  
  <h2><a href="https://i.stack.imgur.com/m0oXR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m0oXR.png" alt="enter image description here"></a></h2>
  
  <p>jenkins does the following under the hood, for groovy syntax(above):</p>
  
  <pre><code>Cloning the remote Git repository
  Cloning repository ssh://git@10.xx.xx.xx:2222/abc/def.git
   &gt; git init /app/jenkins/workspace/../def # timeout=10
  Fetching upstream changes from ssh://git@10.xx.xx.xx:2222/abc/def.git
   &gt; git --version # timeout=10
  using GIT_SSH to set credentials abcuser
   &gt; git fetch --tags --progress ssh://git@10.xx.xx.xx:2222/abc/def.git +refs/heads/*:refs/remotes/origin/*
   &gt; git config remote.origin.url ssh://git@10.xx.xx.xx:2222/abc/def.git # timeout=10
   &gt; git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
   &gt; git config remote.origin.url ssh://git@10.xx.xx.xx:2222/abc/def.git # timeout=10
  Fetching upstream changes from ssh://git@10.xx.xx.xx:2222/abc/def.git
  using GIT_SSH to set credentials abcuser
   &gt; git fetch --tags --progress ssh://git@10.xx.xx.xx:2222/abc/def.git +refs/heads/*:refs/remotes/origin/*
  Checking out Revision 5df59884ecb3aa1b55aabf99ab8bd0adcd4eb41b (refs/remotes/origin/develop)
  Commit message: "new commit"
  </code></pre>
  
  <hr>
  
  <p>For the given groovy syntax, What is the equivalent git command suffice to run on shell? Does <code>git clone -branch</code> or <code>git checkout</code> would not suffice? Why Jenkins is running <code>git fetch</code> multiple times?</p>