title: How to cleanup pipeline before checkout of repository in Jenkinsfile
body: <p>I want to make a <code>clean before checkout</code> operation which is described in Jenkins git plugin <a href="https://plugins.jenkins.io/git/#extensions" rel="nofollow noreferrer">documentation</a>:</p>
  
  <blockquote>
    <p>Clean before checkout Clean the workspace before every checkout by
    deleting all untracked files and directories, including those which
    are specified in .gitignore. ...</p>
  </blockquote>
  
  <p>But how can add this option to default checkout step which is doing as first step?</p>
  
  <p>I feel that it should be an option extended by git plugin which can be included to <code>options</code> block of Jenkinsfile as described in <a href="https://jenkins.io/doc/book/pipeline/syntax/#options" rel="nofollow noreferrer">docs</a>:</p>
  
  <blockquote>
    <p>The options directive allows configuring Pipeline-specific options
    from within the Pipeline itself. Pipeline provides a number of these
    options, such as buildDiscarder, but they may also be provided by
    <strong>plugins</strong>...</p>
  </blockquote>
  
  <p>But how one should know which options and their names this plugin offer? Didn't find it in docs, also i may be wrong that <code>clean before checkout</code> should be placed in <code>options</code> block of Jenkinsfile.</p>
  
  <p>Please help.</p>