I have a really simple Git project, with just a Master branch and no origins.
Somewhere along the line I accidentally created a detached HEAD in my project, and then after making a bunch of commits on that detached HEAD
, tried to merge it back into my Master
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 Master
to switch to that branch and then suddenly my HEAD
disappeared. I can't find it anywhere in SourceTree under All Branches, and git branch
and git log
on the command line only show my Master branch too.
Is there anyway to get back my commits from my lost detached HEAD
?