You either had git configured on the server to git-gc after every push, or were unable to ssh into the server?
If neither one of those is true, then -IIRC- you could have either:
1) Logged in to the server, rewritten the affected repo's branch to point to the pre-disaster commit hash.
2) Pull down the repo's .git directory from the server, rewrite the branch, and force push that.
Would either one of those have been more work than working with your CI system?