The total possible no of unique git commit hash values are - 16^40, 16 possible hexadecimal digits and 40 total digits in the SHA value.
This approximates to ~10^48 (more than that, but just an approximation).
My question is - as the values are unique for commits, how are they not exhausted by now?
Or
Are these values unique only inside a repository i.e. locally unique which will prevent them from being exhausted ever?
As you can see, I am not sure whether they are locally unique or globally.
Edit -
The question has been answered but I would recommend this question Git hash duplicates as it is somewhat similar to my question. Thanks to @torek for mentioning this question.