The 3AM Email That Made GitHub Unstoppable: How Tom Preston-Werner Bet His Marriage on a Side Project and Built the Social Network for Code
โš™๏ธTech, Code & AIMay 11, 2026 at 8:29 AMยท9 min read

The 3AM Email That Made GitHub Unstoppable: How Tom Preston-Werner Bet His Marriage on a Side Project and Built the Social Network for Code

In 2007, a Ruby developer couldn't sleep. His wife was furious. His day job was suffering. But he kept coding a tool that would change how 100 million developers collaborate โ€” and accidentally create Microsoft's most expensive acquisition.

GitHubGitOrigin StoriesFullStackDeveloper ToolsTom Preston-WernerOpen SourceSocial Networks

The Insomnia That Wouldn't Quit

It was 3:47 AM on October 19, 2007. Tom Preston-Werner sat in his San Francisco apartment, bathed in the blue glow of his MacBook. His wife, Theresa, had stopped asking when he was coming to bed. For the fourth night that week, he was coding.

He wasn't working on his day job at Powerset, the search startup that would later sell to Microsoft for $100 million. He wasn't even getting paid for this. He was building something that didn't make sense to anyone โ€” a website for hosting Git repositories with a social layer.

"Everyone thought I was insane," Preston-Werner would later recall. "Git was notoriously difficult. Why would anyone want to put it on the web?"

But Tom had seen something others hadn't. Git was powerful, but it was lonely. Developers were emailing patches. Sharing code meant setting up SSH keys and remembering IP addresses. There was SourceForge, sure, but it was slow, ugly, and built for Subversion.

Tom wanted Git to feel like Facebook. He wanted to follow developers, star projects, fork code with one click. He wanted version control to be social.

His co-workers at Powerset thought he was wasting his time. His wife worried about their finances. But Tom kept coding.

The Ruby Meetup Where Everything Changed

The breakthrough came at a San Francisco Ruby meetup in February 2008. Tom had been showing his prototype โ€” "GitHub" โ€” to anyone who would listen. Most developers were polite but skeptical.

Then Chris Wanstrath saw it.

Chris was a Ruby developer who'd been frustrated by the same problems. He'd tried to contribute to open-source projects and hit walls everywhere โ€” complex patch workflows, maintainers who disappeared, code reviews via mailing lists.

"I saw Tom's demo and thought, 'This is it. This is how code should work,'" Chris later said.

They started talking. Within an hour, they'd decided to build it together. Chris would handle the Rails backend. Tom would focus on the Git integration and UI. They shook hands in a bar and became co-founders.

There was one problem: neither of them could work on it full-time.

The Side Project That Became a Startup

For four months, GitHub was nights and weekends. Tom and Chris would finish their day jobs, then code until 2 AM. Tom's wife, Theresa, was a designer โ€” she started mocking up the interface, creating the iconic Octocat logo.

They launched on April 10, 2008. No press release. No TechCrunch article. Just a blog post and a tweet.

The first user was Chris. The second was Tom. The third was a developer named Scott Chacon, who would later write Pro Git and become GitHub's evangelist.

Within 24 hours, they had 100 users. Within a week, 500. Within a month, 2,000.

The numbers kept climbing, but there was no revenue. GitHub was free. They had no business model. They had no funding. They were burning their savings on AWS bills.

Tom's wife started asking harder questions. When would this make money? When could he quit his day job? Was this a company or just a hobby?

The $100/Month Gamble

In July 2008, four months after launch, Tom and Chris made a bet: they'd add paid plans.

Not for public repos โ€” those would stay free forever, a decision that would define GitHub's culture. But for private repos, they'd charge. $7/month for personal use. $12 for small teams. $22 for bigger ones.

They had no idea if anyone would pay.

On launch day, they watched the dashboard obsessively. The first paid customer came in at 9:43 AM Pacific. Then another. Then five more by lunch.

By the end of the first week, they had $2,200 in monthly recurring revenue.

"That was the moment," Tom later wrote, "when I knew GitHub would be my life."

In October 2008, Tom quit Powerset. Chris quit his job at CNET. They were full-time on GitHub, living off $15,000/month in revenue. No investors. No board. Just two developers and a designer building the tool they wished existed.

The Technical Magic: How GitHub Made Git Human

Git was powerful but user-hostile. Linus Torvalds had built it for kernel developers โ€” people who thought in DAGs and SHA-1 hashes. Commands like git rebase -i HEAD~3 were normal.

GitHub's genius was making Git visual and social without dumbing it down.

Pull Requests โ€” the feature that would define modern software development โ€” didn't exist in Git. They were a GitHub invention. Instead of emailing patches, you'd fork a repo, push changes, and click "Pull Request." The maintainer could see a diff, comment line-by-line, and merge with one click.

Under the hood, this was complex. GitHub had to:

  • Maintain forks as lightweight references, not full copies
  • Generate diffs on-demand without killing servers
  • Handle merge conflicts gracefully in the UI
  • Make it work for repos with 100,000+ commits

The Activity Feed โ€” GitHub turned Git logs into a social stream. You could follow developers, watch repos, see what your friends were starring. This was revolutionary. Suddenly, open source had a discovery layer.

Technically, this meant:

  • Indexing Git history in real-time (they used MySQL early on, later migrated to a custom data store)
  • Caching aggressively (Redis became GitHub's best friend)
  • Handling fan-out for popular users (when Linus Torvalds committed, 50,000 feeds updated)

The Architecture โ€” GitHub started as a Rails monolith, but they innovated in how they interfaced with Git:

  • Git operations ran in isolated processes (via Grit, a Ruby Git library Tom wrote)
  • Heavy operations were queued (Resque, backed by Redis)
  • File browsing was cached aggressively (they'd pre-render syntax highlighting)
  • Clones/pushes went through a custom Git proxy that handled auth and logging

By 2010, they were serving millions of Git operations per day on a Rails app with fewer than 20 employees.

The No-VC Revolution

In 2009, VCs started calling. Sequoia wanted in. Andreessen Horowitz wanted in. Everyone wanted to fund the fastest-growing developer tool on the planet.

Tom, Chris, and their third co-founder PJ Hyett (who'd joined early) said no.

They'd watched startups raise millions, then burn it on sales teams and marketing. GitHub was profitable. Why give up control?

For three years, GitHub grew without venture capital. By 2012, they had:

  • 1.8 million users
  • 2.9 million repositories
  • $6 million in annual revenue
  • 57 employees

They'd proven you could build a massive developer platform without selling your soul to Sand Hill Road.

But in July 2012, they changed their minds. Not because they needed money โ€” but because Andreessen Horowitz offered $100 million at a $750 million valuation with almost no strings attached. No board seat. No pressure to sell. Just validation and a war chest.

They took it.

The Eclipse of SourceForge and Google Code

By 2013, GitHub had become the center of gravity for open source. SourceForge, once the king, was dying โ€” slow, ad-riddled, stuck in 2005. Google Code shut down in 2015, unable to compete.

Even giants moved to GitHub. Microsoft โ€” which had once called open source "cancer" โ€” put .NET on GitHub in 2014. Apple put Swift there in 2015. Google put TensorFlow there in 2015.

GitHub had become infrastructure. The social layer for code. The resume for developers. The portfolio for engineers.

But it was the Pull Request that changed everything.

The Feature That Ate Software Development

Pull Requests weren't just a feature. They were a workflow revolution.

Before GitHub, contributing to open source meant:

  1. Email a patch to a mailing list
  2. Hope the maintainer saw it
  3. Argue over formatting in plain text
  4. Maybe get merged weeks later

With Pull Requests:

  1. Fork, code, push
  2. Click "Pull Request"
  3. Inline code review with syntax highlighting
  4. Merge or reject with context

This workflow became so standard that even companies using GitLab, Bitbucket, or self-hosted Git adopted "Pull Request" as the term.

GitHub had invented a protocol. They'd changed how software was built.

The $7.5 Billion Acquisition

In October 2018, Microsoft announced it was acquiring GitHub for $7.5 billion in stock.

Developers panicked. Microsoft? The company that had fought open source for decades? The company that called Linux "communism"?

But Satya Nadella's Microsoft was different. They'd already open-sourced .NET. They'd put Visual Studio Code on GitHub. They'd contributed to Kubernetes.

And they understood something crucial: developers had moved to GitHub. If you wanted to attract developers, you needed to be where they lived.

Tom Preston-Werner had left GitHub in 2014 after a harassment controversy. Chris Wanstrath was CEO when the deal closed. He stayed on for a year to help with the transition, then left to work on new projects.

The side project that almost ended a marriage had become the most expensive developer tool acquisition in history.

The Legacy: Git's Social Layer

Today, GitHub hosts over 100 million developers and 420 million repositories. It's where the Linux kernel lives. Where React is built. Where TensorFlow is maintained. Where Kubernetes is coordinated.

Every modern developer workflow โ€” CI/CD, code review, issue tracking, project management โ€” has been shaped by GitHub's decisions.

Pull Requests changed software collaboration forever. Forks made open source accessible. Stars gave developers a currency. GitHub Actions turned repos into full deployment pipelines.

And it all started with a sleep-deprived developer who thought Git could be social.

Tom Preston-Werner's 3 AM emails. Chris Wanstrath's Rails expertise. Theresa's Octocat. A $7/month pricing experiment. A refusal to take VC money until they didn't need it.

GitHub didn't just build a product. They built the social network for code โ€” and accidentally rewrote how software gets made.

The insomnia was worth it.

โœ๏ธ
Written by Swayam Mohanty
Untold stories behind the tech giants, legendary moments, and the code that changed the world.

Keep Reading