Unfortunately I did several times git reset --hard HEAD^ losing a quite big chunk of code in several files. Is there a way to restore those commits or in this case
git reset --hard HEAD^
Run git reset --hard HEAD@{1} if you just committed your code and you want to undo that.
git reset --hard HEAD@{1}
See Section called "Ordinal Spec" at http://book.git-scm.com/4_git_treeishes.html