title: git error while trying to checkout branch
body: <p>I am getting this error while trying to do git checkout:</p>
  
  <pre><code>git checkout BranchName
  </code></pre>
  
  <blockquote>
    <p>error: Your local changes to the following files would be overwritten by checkout:</p>
  </blockquote>
  
  <pre><code>git status
  On branch BranchName
  Your branch is ahead of 'origin/BranchName' by 5 commits.
    (use "git push" to publish your local commits)
  
  Changes not staged for commit:
    (use "git add &lt;file&gt;..." to update what will be committed)
    (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
  </code></pre>
  
  <p>I do not want to commit these changes.</p>
  
  <p>How to ignore these file types while doing checkout:</p>
  
  <ul>
  <li>target</li>
  <li>out</li>
  <li>*.log</li>
  <li>*.iml</li>
  <li>.idea</li>
  <li>.slcache</li>
  </ul>