DEV Community

Cover image for Why Git Was Created
Farhad Rahimi Klie
Farhad Rahimi Klie

Posted on

Why Git Was Created

Before Git, the Linux kernel developers used a version control system called BitKeeper.

BitKeeper was proprietary software, but Linux developers could use it for free for kernel development.

Then in 2005:

  • Licensing conflicts happened
  • Access to BitKeeper was removed for Linux developers
  • The Linux kernel team suddenly lost the tool managing one of the world’s biggest software projects

This was a disaster.

The Linux kernel already had:

  • thousands of files
  • many developers
  • patches arriving constantly
  • changes from all over the world

Linus Torvalds needed a replacement immediately.

He did not like existing systems because they were:

  • slow
  • centralized
  • hard to merge
  • bad at handling large distributed development

So he decided to build his own system.


2. How Fast Git Was Built

This is one of the most famous parts of Git history.

The first version of Git was built in only a few days.

Core development timeline:

  • Day 1–2: Basic object storage and hashing concepts
  • Around Day 4: Could track file snapshots
  • Around Day 10: Basic branching and commits worked
  • Within about 2 weeks: Git became usable for Linux kernel development

That speed sounds impossible today, but several things made it possible:

Linus already understood:

  • operating systems
  • filesystems
  • performance engineering
  • distributed collaboration
  • kernel development workflows
  • low-level data structures

He was not experimenting randomly.

He already had a very clear mental model before writing code.


3. What Language Git Was Written In

Git was primarily written in:

  • C

Why C?

Because:

  • extremely fast
  • direct filesystem access
  • portable
  • already used heavily in Linux
  • minimal overhead
  • efficient memory control

Git also used:

  • shell scripting initially
  • some Perl scripts in older tooling

But the core engine was C.

Today Git includes:

  • C
  • shell
  • Perl
  • Python
  • Tcl/Tk
  • some platform-specific code

But its heart is still mostly C.


4. The Mentality Behind Git

This is the most important part.

Git was not designed like a normal “application.”

Linus designed Git like a filesystem + cryptographic database.

His mentality was:

“Store everything as immutable content objects.”

That single idea shaped all Git architecture.


5. The Core Philosophy of Git

Most old version control systems stored:

  • file differences
  • centralized history
  • sequential changes

Git instead stores:

  • complete snapshots
  • content-addressed objects
  • immutable history

This was revolutionary.

Git thinks like this:

Project State → Hash → Stored Object
Enter fullscreen mode Exit fullscreen mode

Not:

Edit A → Edit B → Edit C
Enter fullscreen mode Exit fullscreen mode

That difference is enormous.


6. Git’s Most Important Idea: Hashing

Git uses cryptographic hashes.

Originally:

  • SHA-1

Every file and object gets a unique hash.

Example:

e83c5163316f89bfbde7d9ab23ca2e25604af290
Enter fullscreen mode Exit fullscreen mode

That hash identifies content.

Meaning:

  • if content changes
  • hash changes

So Git can detect:

  • modifications
  • corruption
  • exact history relationships

This made Git:

  • reliable
  • fast
  • distributed

7. Git Was Designed Backwards From Performance

Linus cared deeply about performance.

His priorities were:

  1. Speed
  2. Data integrity
  3. Distributed workflow
  4. Branching efficiency
  5. Merge capability

Not:

  • pretty UI
  • beginner friendliness
  • enterprise features

That is why Git commands can feel difficult.

It was originally designed for kernel developers.


8. The Architecture of Git

Git internally stores objects:

Blob

Stores file contents.

Tree

Stores directory structures.

Commit

Stores:

  • author
  • timestamp
  • parent commits
  • snapshot reference

Tag

Named references.

Everything becomes objects.


9. Why Git Branching Is So Fast

In many older systems:

  • branches copied files

In Git:

  • branches are basically lightweight pointers.

A branch is almost just:

branch_name → commit_hash
Enter fullscreen mode Exit fullscreen mode

That means:

  • branch creation is nearly instant
  • switching branches is fast
  • merging is easier

This was a huge innovation.


10. Git Was Built for Distributed Development

Older systems often relied on a central server.

Git changed this.

Every developer gets:

  • full history
  • full commits
  • full branches
  • complete repository

Meaning:

  • work offline
  • no single point of failure
  • easier collaboration

This was revolutionary in 2005.


11. How Linus Actually Built It

Linus usually builds software with this mentality:

Step 1 — Solve only the core problem

No unnecessary abstractions.

Step 2 — Make data structures efficient

Performance first.

Step 3 — Use small composable tools

Git originally had many tiny commands.

Step 4 — Trust powerful primitives

Instead of giant frameworks.

Step 5 — Optimize around real workflows

Not theoretical design.

This is very Unix-like thinking.


12. Early Git Was Extremely Rough

The first Git versions were:

  • ugly
  • command-line heavy
  • poorly documented
  • hard to use

Linus himself said he was not trying to make it pretty.

He only wanted:

  • speed
  • correctness
  • distributed functionality

Later developers improved usability.

One major contributor was:

Junio Hamano

He became the long-term maintainer and helped Git mature into a polished tool.


13. Why Git Became Dominant

Git became dominant because it solved real engineering pain better than competitors.

Major advantages:

  • fast branching
  • powerful merging
  • offline development
  • integrity checking
  • scalability
  • distributed collaboration

This made it perfect for:

  • open source
  • large engineering teams
  • internet-scale collaboration

Then platforms like:

  • GitHub
  • GitLab
  • Bitbucket

accelerated adoption massively.


14. The Most Important Technical Insight

Git is not really “a source control app.”

Internally, it is closer to:

  • a content-addressable object database
  • plus graph relationships
  • plus filesystem snapshots

That architectural decision is why Git still scales today.


15. Why Git Feels Complicated

Because Git exposes internal concepts directly:

  • HEAD
  • refs
  • index
  • detached HEAD
  • rebasing
  • object store

Linus optimized for:

  • power
  • flexibility
  • speed

not beginner simplicity.

That tradeoff is still visible today.


16. The Deep Engineering Lesson From Git

Git teaches a major software engineering principle:

Great systems are often built from a few powerful primitives.

Git’s primitives:

  • hashes
  • immutable objects
  • pointers
  • graphs
  • snapshots

From those few concepts, an entire ecosystem emerged.


17. Final Summary

Git was:

  • created in 2005
  • mainly built by Linus Torvalds
  • written mostly in C
  • initially usable within about 10–14 days
  • designed under extreme pressure
  • optimized for speed and distributed collaboration

The mentality behind Git was:

Simple primitives
+ immutable data
+ hashing
+ distributed architecture
+ performance-first engineering
Enter fullscreen mode Exit fullscreen mode

That combination changed software development forever.

Top comments (0)