Ensure HEAD is reset before analyzing current commits
Recover formulae after regenerating repositories