title: How to revert initial git commit?
body: <p>I commit to a git repository for the first time; I then regret the commit and want to revert it.  I try</p>
  
  <pre><code># git reset --hard HEAD~1
  </code></pre>
  
  <p>I get this message:</p>
  
  <pre><code>fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.
  </code></pre>
  
  <p>This commit is the first commit of the repository. Any idea how to undo git's initial commit?</p>