In Git, every commit id的信息(如f2c8ea6ea648d4b097f2e552b674f856a86c31cc)就是一个sha1 hash值,如果想查看自己分支中的coomit id执行git log will do. As picture
Generate this hash value, which is a checksum checksum of the content and header information in the Git repository that the commit is. Linus, the founder of the Linux kernel and the developer of Git, said that Git uses sha1 not for security, but for data integrity; it can ensure that many years later, when you checkout a commit again, it will be It is exactly the same as it was at the time many years ago and is completely trustworthy. In Git, the directory is simply divided based on the 40 hexadecimal digits of the commit's sha1 value. The first 2 digits are used as the directory name, and below it is a file name composed of the remaining 38 digits. Hope it helps you. For details, please refer to Git Object
In Git, every
commit id
的信息(如f2c8ea6ea648d4b097f2e552b674f856a86c31cc
)就是一个sha1 hash值,如果想查看自己分支中的coomit id
执行git log
will do. As pictureGenerate this hash value, which is a checksum checksum of the content and header information in the Git repository that the commit is. Linus, the founder of the Linux kernel and the developer of Git, said that Git uses sha1 not for security, but for data integrity; it can ensure that many years later, when you checkout a commit again, it will be It is exactly the same as it was at the time many years ago and is completely trustworthy. In Git, the directory is simply divided based on the 40 hexadecimal digits of the commit's sha1 value. The first 2 digits are used as the directory name, and below it is a file name composed of the remaining 38 digits. Hope it helps you. For details, please refer to Git Object