title: How to checkout to specific branch instead of current branch in config.yml file of CircleCI
body: <p>I want to checkout to a specific branch (ex. master) in the config.yml file of CircleCI v2.1.
  The below code by default checkout to the current branch but instead I want it to checkout to a specific branch</p>
  <pre><code>steps:
    - checkout
  </code></pre>
  <p>I have tried implementing the below code which shows on UI that it got checkout to master but the steps after this command (which are related to archiving the package) still use the code of the current branch.</p>
  <pre><code>steps:
    - checkout
    - run: git checkout master
  </code></pre>
  <p>I have also tried removing the &quot;checkout&quot; statement and just keeping &quot;run: git checkout master&quot; but I got <strong>fatal: not a git repository (or any of the parent directories): .git</strong> error.</p>
  <p>I have looked into <a href="https://circleci.com/docs/2.0/configuration-reference/#section=configuration" rel="nofollow noreferrer">https://circleci.com/docs/2.0/configuration-reference/#section=configuration</a> document but haven't found anything useful related to this.</p>