Accidentally deleted all my commits on Git — what happened?
<p>Okay let me start off by saying that I hate git so much. I was getting error message after error message and it resulted in every commit on my project being deleted. Here are the recent commands that I did:</p>

<pre><code>git push origin master
</code></pre>

<p>which gave me an error:</p>

<pre><code>error: failed to push some refs to '[repository link here]'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
</code></pre>

<p>then I found a resource online and did this:</p>

<pre><code>git pull origin master
git push -f origin master
</code></pre>

<p>and then everything was gone except that one commit. What do I do to recover?</p>