Rating:
Git fsck to locate working commit, git checkout for a new head and git log / git checkout again for the flag.
I don't remember