A checksum uniquely identifies a commit.The checksum is the result of combining all the changes in the commit and feeding them to an algorithm that generates these 40-character strings.'SHA' stands for Simple Hashing Algorithm.Those strings are actually not random the string is the SHA-1 checksum of all the changes in that commit.