Git In-depth Data Storage
Transcript from the "Data Storage" Lesson
>> Nina Zakharenko: So what is git? We've all heard this term before. It's a distributed version control system. But in order to truly understand git, we need to learn how git stores information. At its core, git is kind of like a key value store. The value is the data, and the key is hash of the data.
[00:00:24] You can then use the key to retrieve the content.
>> Nina Zakharenko: The key is, it's called a SHA1. It's a cryptographic hash function, so given a piece of data, it produces a 40-digit hexadecimal number. And that number, that value will always be the same if the given input is the same.
[00:00:49] So you look at git log, you see lots of 40-digit hexadecimal numbers, those are called SHA1s. Sometimes, and this is also called, this type of system is called a content addressable storage system. And that's because you can use the content to generate the key. So if the hash is always the same given a piece of content, that also means that given the content, you can generate the key.