title: Nothing to commit, working tree clean after calling git checkout
body: <p>I tried to delete my last commit. I thought that <code>git checkout</code> followed by the hash of the <code>commit</code> would replace my current code with the code of the <code>commit</code>. This didn't work and I get now a message which says <code>Nothing to commit, working tree clean</code>. How can I get rid of this message and delete my last commit?</p>