Understanding Git under the hood

How Git internals work to organize data and history

Udara Bibile
The Startup

--

Most developers are familiar with version control system and git is de facto choice for most cases. This article is actually to introduce how git works, and this will enable for developers to understand git better.

Git is distributed version control where history of file and directory changes are stored such that developers can travel through time to gather how all the changes happened. Initially git was created by Linux creator to manage Linux kernel development when having multiple open-source developer.

In Linux manual pages (man git), Git is identified as “the stupid content tracker”. Through this article you can identify why git is called as such.

Git ‘Porcelain’ & ‘Plumbing’ Commands

Most of the commands used in developer work flows are known as “porcelain commands”. But these commands are constructed through low level commands known as “plumbing commands”. Lets take an example:

  • Porcelain Commandsgit add, git commit, git push, git pull, git branch, git checkout, git tag, git merge, git rebase & more…
  • Plumbing Commandsgit cat-file, git has-object, git count-objects

Understanding Hashes & SHA-1

Even though y’all should be familiar with hashes, it is required to summarize a bit to make this article is complete. Simply…

--

--