20 years of Git: ‘Never a big thing for me,’ says inventor Linus Torvalds 

20 years of Git: ‘Never a big thing for me,’ says inventor Linus Torvalds 

Git, the dominant version control system for code, is 20 years old this month, but inventor Linus Torvalds said that it “was never a big thing for me” since it was only made to support the work on the Linux kernel.

The first commit of Git itself was on April 7th 2005, from which we also learn what Git does or does not stand for

Torvalds said in 2007 that he could not remember “exactly when I started git development” but that he probably started at or around April 3rd 2005, that the project was self-hosting from April 7th – the first commit of Git is 1244 lines of commented code and described as “the information manager from hell” – and that the first commit of the Linux kernel was on April 16th

Torvalds was interviewed this week by GitHub staff software engineer Taylor Blau. He described the origins of the project, caused by the licensing of BitKeeper which he used at the time for Linux kernel development. His two priorities, he said, were performance and stability.

Git uses the known-insecure SHA-1 hashing algorithm for verifying files, and this remains the default 20 years later, though SHA-256 is now an option. “People kind of think that using the SHA-1 hashes was a huge mistake,” said Torvalds. “But to me, SHA-1 hashes were never about the security. It was about finding corruption.”

He nevertheless regrets using SHA-1 because it caused wasted effort and (mostly) “pointless churn.”

Git is successful to the extent that it dominates SCM (source code management). When Stack Overflow last asked developers about this, 96.65 percent of professional developers said they used Git, ahead of SVN (Subversion) at just 5.96 percent.

Git usage among professional developers (Source: Stack Overflow 2022 survey)

Despite this, Torvalds said that “Git was an ‘I need to get this done to do the kernel'” project and not one that was important to him in itself. He maintained Git for four months and then handed it over to Junio Harmano, now at Google, who still maintains it today.

Git did what he needed within the first year, said Torvalds, “and when it did what I needed, I lost interest.”

Torvalds described himself as a casual user of Git who mainly uses just five commands: git merge, git blame, git log, git commit and git pull – though he adds later in the interview that he also uses git status “fairly regularly.”

Why did Git succeed? Scott Chacon, co-founder of GitHub and now at startup company GitButler, said that it filled a gap at the time when open source was evolving. SVN, which actually has an easier mental model, is centralized. There was no easy way in 2005 for an open source contributor to submit proposed changes to a code base. Git made it simple to fork the code, make a change, and then send a request to the maintainers that they pull the changed code from the fork to the main branch. Git has a command called request-pull which formats an email for sending to a mailing list with the request included, and this is the origin of the term pull request.

Chacon said that performance was also a big attraction. “In the early days of Git, I would do talks where I would go on stage, create a few branches, commit changes into them, switch between them and then merge them together, all in 60 seconds. I would literally see people’s jaw drop.”

Git was not alone though. Mercurial, written by Olivia Mackall for the same reason as Git (the BitKeeper issue) and also intended for use with the Linux kernel code. Chacon said that Mercurial was “similar in a lot of ways and better in many” but that the decision of the kernel developers to use Git pushed the software development world in that direction. Another factor, he said, was GitHub, founded in October 2005, which made Git adoption easier by providing convenient hosting.

Git is not universally admired. D Richard Hipp, creator of SQLite, prefers the self-developed Fossil for managing SQLite code. Facebook uses a customized Mercurial for its own code. Git is not always intuitive and there is plenty to trip-up or confuse newcomers.

What is the future of Git? Torvalds is the wrong person to ask. “I’m not following the Git mailing list as much as I used to,” he confesses. Still, he does think that Git has a “very strong network effect” which makes it difficult to supplant.