I myself have committed with a hash of 0000000 into a git repository twice, meaning it is easy to confuse those two commits.
An attacker would merely have to brute force the tip of their attacker repository, a matter which you can do within the hour on a stock standard PC.