title: git checkout master error: the following untracked working tree files would be overwritten by checkout
body: <p>I have a git repository. It has A B C D E ... commits. Now I want to checkout D as a new branch named Dbranch. So I excute:<code>git checkout D -b Dbranch</code>. And now I want to delete this branch. Firstly I need to switch to master branch , and then use <code>git branch -d Dbranch</code> to delete it. But when I excute <code>git checkout master</code>, it gives me the error. </p>
  
  <pre><code>error: The following untracked working tree files would be overwritten by checkout:
      source/a/foo.c
          ...... (too many lines)
  Please move or remove them before you can switch branches.
  Aborting
  </code></pre>
  
  <p>How to delete the Dbranch?</p>