title: Why does git checkout not delete new files?
body: <p>Suppose I create (but do not commit) a file <code>file.txt</code>, and then type <code>git checkout HEAD</code> or <code>git checkout HEAD .</code>. I thought <code>git checkout</code> basically overwrote your current working files with the snapshot at the commit you give it, so I would have thought this would delete <code>file.txt</code>. But it doesn't. Why?</p>