title: In Jenkins, how do I set SCM behavior for the master node rather the build nodes?
body: <p>I'm aware I'm lacking basic Jenkins concepts but with my current knowledge it's hard for to research successfully - maybe you can give me some hints I can use to re-word my question if needed.</p>
  <p>Currently I'm facing a situation in which in a setup with several build nodes the Jenkins master machine is running out of disk space because Jenkins clones git repositories on both, the master and build nodes (and the master only has limited space). <a href="https://stackoverflow.com/questions/39452030">This question</a> explains why.</p>
  <p>Note: the master node itself does <em>not</em> build anything - it just clones the repo to a local workspace folder (I guess it just needs the Jenkinsfiles).</p>
  <p>Going through the job configurations and googling this issue I find options regarding shallow and sparse clones or cleaning up the workspace before or after the build using the <a href="https://plugins.jenkins.io/ws-cleanup/" rel="noreferrer">Cleanup Plugin</a>. But those settings and plugins only care about the checkout done with <code>checkout(SCM)</code> on the <em>build nodes</em>, not the master.</p>
  <p>But in case I want to leave the situation as is on the <em>build nodes</em> but keep the workspace folders on the Jenkins master machine slim, how do I approach this? What do I have to search for?</p>
  <p>And as a side question - isn't it possible to have something like &quot;git exports&quot;? I.e. having the <code>.git</code> folders removed after checking out the commit I need?</p>
  <p>In case it depends on the kind of job I use, I'm using scripted pipeline jobs.</p>