My working git repository is broken, it lose track to all the files in it, i.e.
$ git log fatal: bad default revision 'HEAD'
$ git status ... told me that all the files are new
However the .git directory does contain my objects.
$ du -sh .git 34M .git
$ git count-objects 4151 objects, 32692 kilobytes
$ git --version git version 1.6.0.4
The last thing I remember doing before it went wrong was creating (clone --mirror) a backup repository at an NFS-mounted server. However the backup repository cloned is broken the same way.
How can I restore my repository?