title: Retrieve lost HEAD branch in git
body: <p>I have a really simple Git project, with just a Master branch and no origins.</p>
  
  <p>Somewhere along the line I accidentally created a detached HEAD in my project, and then after making a bunch of commits on that detached <code>HEAD</code>, tried to merge it back into my <code>Master</code> branch. I was doing this in SourceTree, and at first the merge seemed to work (the graph showed master going into head, and there were merge conflicts which I fixed), but then I double clicked on <code>Master</code> to switch to that branch and then suddenly my <code>HEAD</code> disappeared. I can't find it anywhere in SourceTree under All Branches, and <code>git branch</code> and <code>git log</code> on the command line only show my Master branch too.</p>
  
  <p>Is there anyway to get back my commits from my lost detached <code>HEAD</code>?</p>