Tech●●●●●Difficulty 2 of 5

Why did Linus Torvalds write Git in just a few weeks?

A license dispute left the Linux team without their tool, so Torvalds wrote a replacement that was self-hosting within days.

▶ Start the story

Torvalds wrote Git in a rush because he had to. Until April 2005, the Linux team used BitKeeper, a tool. When its free was revoked for Linux, the team lost the way they shared work, and Torvalds found that no existing tool met his needs. So he started Git on 3 April 2005. Four days after he began, it was already hosting its own development.

The speed target was extreme. Torvalds pointed to a tool that took 30 seconds to apply one , while a maintainer might need 250 such actions at once. He demanded that a patch take no more than three seconds. He also wanted a distributed workflow like BitKeeper's, very strong safeguards against corruption, and, as a design principle, the opposite of what CVS did when in doubt. Those goals ruled out every system in use at the time.

3 s

the longest Torvalds would accept for applying a patch, when one rival tool needed 30 seconds

The result moved fast. Torvalds announced the project on 6 April, the first merge of several branches happened on 18 April, and by 29 April Git recorded patches to the at 6.7 patches per second. By 16 June it was managing a kernel release.

Why has a tool made in a hurry lasted? Git's central idea is that every developer holds the full history, and branches are very lightweight, because a branch is only a reference to one commit. In 2022 nearly 95% of developers reported it as their main tool. The name is a joke Torvalds made at his own expense, since git is British slang for an unpleasant or silly person.

Quiz me

0/3

  1. 1.What event pushed Torvalds to write Git?
  2. 2.Why was a three-second limit for applying a patch so important to Torvalds?
  3. 3.Why are branches cheap in Git?

Recap

Git was built in weeks because the Linux team lost BitKeeper and no free tool was fast, distributed and safe enough.

💡 A trick to remember it · A lost tool, a three-second target, a few weeks of work: Git is what you build when the old tool is taken away.

Surprising fact · Git was self-hosting four days after development began.

Sources (3)

No source, no claim. Every fact in this lesson (17 claims) cites at least one of these.

  1. [1]Git Book: A Short History of Git · git-scm.com
  2. [2]BitKeeper · Wikipedia
  3. [3]Git · Wikipedia
More lessons in 💻 Tech (3) See all tech lessons →

One more light on your map.

Get one lesson like this every day, about the things you love. Free, in two or five minutes.

Get the share card for this lesson ↗