Jenkinsfile checkout to a specific folder via git command
<p>I want to run this command in the jenkinsfile</p>

<pre><code>git checkout &lt;repo&gt; &lt;folder name&gt;
</code></pre>

<p>but I get this error</p>

<pre><code>[git-checkout-example] Running shell script
+ git checkout git@code.in.spdigital.io:sp-digital/jarvis-api.git wahahah
fatal: Not a git repository (or any of the parent directories): .git
</code></pre>

<p>Any idea how can I go about doing it in Jenkinsfile? can I checkout the files to a specific folder?</p>