# The internal secrets of Git

DevFeed: [The internal secrets of Git](<https://devfeed.tech/articles/the-internal-secrets-of-git-33358.md>)

Original publisher: [Read original article](<https://timkellogg.me/blog/2011/02/13/internal-secrets-of-git>)

Published: 2011-02-13T00:00:00Z

Content type: opinion

Language: en

Sources: [Tim Kellogg](<https://devfeed.tech/sources/tim-kellogg.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [version-control](<https://devfeed.tech/topics/version-control.md>), [file](<https://devfeed.tech/topics/file.md>), [hash](<https://devfeed.tech/topics/hash.md>), [Library](<https://devfeed.tech/topics/library.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [static-site-generator](<https://devfeed.tech/topics/static-site-generator.md>)

Tags: [git](<https://devfeed.tech/tags/git.md>), [github](<https://devfeed.tech/tags/github.md>), [hash](<https://devfeed.tech/tags/hash.md>), [library](<https://devfeed.tech/tags/library.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [static-site-generator](<https://devfeed.tech/tags/static-site-generator.md>), [version-control](<https://devfeed.tech/tags/version-control.md>)

## AI overview

The article reflects on a lecture about Git's internal file format and argues that Git functions as a userspace filesystem with built-in versioning and synchronization. It explains how content hashes enable fast file comparison and make filenames less important, and highlights libgit2 as a reusable C library that could support broader Git-based projects.

## Source excerpt

Thursday night I attended a lecture at the Boulder Linux user's group called Unlocking the Secrets of Git by Tom, one of the co-founders of Github. This was extremely eye-opening. Up until now I had viewed Git as simply a distributed version control system. Tom showed us how to manipulate Git's internal file format and demonstrated that Git is actually a filesystem in userspace with built-in versioning and synchronization. He demonstrated how, by storing a SHA1 hash of files, Git is (1) extremely fast at comparing files and (2) doesn't actually care about the file name - it just cares about the contents of files. This is important when you're renaming files - the filename is generally unimportant in the grand scheme of things.Tom also showed us several open source projects that build upon the concept of Git as a filesystem. One was a highly efficient backup system. Another is a static site generator. There were many more. The point here is that Git is destined to be not just version control; it will be a feature-complete platform for anything that requires a filesystem with versioning and synchronization.The critical component to the success of Git as a plaform is libgit2, a C library for interacting with Git. The reason why this is the critical component is that many people had been re-creating the functionality of Git. By combining this functionality into a library, the logic only has to be written once and can be used by everyone else. The other reason why this is a critical component is because libgit2 is being released under a permissive license that allows it to be easily used by many other people and projects without getting into any legal snafu's. Most importantly, Thursday night I realized that the tech community of Boulder is so complex and complete, I should never get bored here. I haven't lived here for a full six months yet but already I feel like I can't leave this city.