Rating:

Git fsck to locate working commit, git checkout for a new head and git log / git checkout again for the flag.

Original writeup (https://advancedpersistentjest.com/2018/04/15/writeups-diary-isoar-midnight-sun-ctf-quals/).