GitInfo causing error at build time

Hugo is throwing the following error on the build server but not when run locally

ERROR 2019/01/31 12:38:08 Failed to read Git log: error: object directory ... does not exist; check .git/objects/info/alternates.
fatal: bad object HEAD

I figure this probably points to build problem, not a Hugo problem, but I wondered if anyone had any ideas since I don’t see this error anywhere else. (Hugo v0.50)

This is hard to troubleshoot without (1) seeing your code, and (2) seeing your build server config