title: git rebase ate my commits ! Translate 'git reflog' output for me?
body: <p>I had done five commits and I wanted to make them all into one commit before pushing them. For some reason I decided to try doing this by a different means than I usually use.</p>
  
  <p>FWIW: I was attempting to follow the instructions here <a href="http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html" rel="nofollow noreferrer">http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html</a> .</p>
  
  <p>I'll put a lot of detail below but you might want to skip down to the bottom of the question where I put the output of <code>git reflog</code> because I suspect that's what's significant here.</p>
  
  <p>So here's what I did - with all my changes committed I did :</p>
  
  <pre><code>git rebase -i HEAD~5
  </code></pre>
  
  <p>and I was presented with the text editor which showed the commits and I, wrongly I now realise, changed all the first column values of 'pick' to 'squash'.</p>
  
  <p>I then saw an error message. To my shame I can't remember what the error message said but I think it said something like "You have no commit to use".</p>
  
  <p>At that point I was back to the prompt and when I try to repeat the :</p>
  
  <pre><code>git rebase -i HEAD~5
  </code></pre>
  
  <p>I get the message :</p>
  
  <pre><code>It seems that there is already a rebase-merge directory, and
  I wonder if you are in the middle of another rebase.  If that is the
  case, please try
          git rebase (--continue | --abort | --skip)
  If that is not the case, please
          rm -fr /home/foo/dev/bar/.git/rebase-merge
  and run me again.  I am stopping in case you still have something
  valuable there.
  </code></pre>
  
  <p>Then I read this answer <a href="https://stackoverflow.com/a/12163247/364088">https://stackoverflow.com/a/12163247/364088</a> which suggests doing :</p>
  
  <pre><code>git reset --soft HEAD^
  </code></pre>
  
  <p>I did that (I wish I had not). After I'd done it. </p>
  
  <pre><code>git status
  </code></pre>
  
  <p>showed a number of files with uncommitted changes although </p>
  
  <pre><code>git diff
  </code></pre>
  
  <p>showed no changes . Anyway I then did a </p>
  
  <pre><code>git commit
  </code></pre>
  
  <p>And now I have lost all my chnages in the last five commits !</p>
  
  <pre><code>git reflog
  </code></pre>
  
  <p>shows (this is just the top of it):</p>
  
  <pre><code>3f80e4b HEAD@{0}: commit: Decorator demo added
  1888dd9 HEAD@{1}: reset: moving to HEAD^
  7d6228e HEAD@{2}: checkout: moving from master to 7d6228eb9b03d0c45acf7c66e662220213cf4fb9
  705736f HEAD@{3}: commit: Snapshot commit - squash later
  75db0c3 HEAD@{4}: commit: Snapshot commit - squash later
  b70b50f HEAD@{5}: commit: Snapshot commit - squash later
  d970a62 HEAD@{6}: commit: Snapshot commit - squash later
  0f24e88 HEAD@{7}: commit: Snapshot commit - squash later
  7d6228e HEAD@{8}: commit: Move some standard code into its own module and tidy up .
  1888dd9 HEAD@{9}: commit: Early version of the decorators demo
  </code></pre>
  
  <p>So the thing is the commits labelled "Snapshot commit - squash later" are the ones I wanted to merge into a single commit. </p>
  
  <p>The commits HEAD@{2} and HEAD@{1} are stuff I've done in the process of trying to merge those "Snapshot commit - squash later". The commit HEAD@{0} is the commit I did after the rebase and the reset.</p>
  
  <p>In case it matters the last commit pushed was HEAD@{8}.</p>
  
  <p>So what I'd like is to get back to the '705736f' commit and then, ideally do the merging of commits again only this time make it work !</p>
  
  <p>I'd be quite happy if I could recover the work in the "Snapshot commit - squash later" changes.</p>
  
  <p>Would be grateful for advice.</p>