<p>Is it possible to undo the changes caused by the following command? If so, how?</p>

<pre><code>git reset --hard HEAD~1
</code></pre>

What you want to do is to specify the sha1 of the commit you want to restore to.  You can get the sha1 by examining the reflog (
```
git reflog
```
) and then doing
```
```
git reset --hard <sha1 of desired commit>
```
```
But don't wait too long... after a few weeks git will eventually see that commit as unreferenced and delete all the blobs.