Surely as an organization like Github receives a code commit, it stores only the changes rather than every historic version of the file.
Although such a scheme is obviously possible and not incredibly difficult, I couldn't seem to find an explanation of how it's done. I suspect there's a long list of literature on the topic but I'm not sure what term I'd need to search.
Googling the relevant keywords and phrases turns up nothing but "user" tutorials on storing / viewing file history in various environments.
What's the term for the algorithm that does this?