Depends on the total number of commits. The probability can be approximated as

  • is the number of items
  • is the number of possibilities for each item

The number of possibilities for a hex string is

  • where is the number of characters.

So for 8 characters and 30K commits (assuming 30K):

Increasing it to 12 characters: