Build your product so every user's work publicly accumulates into a shared graph of identities and relationships, then seed influential creators first so their projects pull everyone else in.
GitHub
GitHub is developer collaboration built on top of Git: public repos, pull requests, and profiles that together became the place software gets written. Launched in April 2008 by Tom Preston-Werner, Chris Wanstrath, P.J. Hyett, and Scott Chacon, it won not by hosting code better but by owning the identity and collaboration layer of the entire developer community. The through-line across its stories is that the network graph, not the hosting, is the asset: seed the influential users, let their projects pull everyone in, and the accumulated graph becomes a moat no feature war can crack.
Network Effect: every repo and contributor made the graph worth more
The problem. Version control was a solitary or small-team affair. Git (released 2005) made distributed collaboration technically possible, but there was no shared place where a project's team and its outside contributors could actually meet, so each codebase sat on its own island with value trapped locally.
The approach. GitHub built two overlapping network layers on top of Git. Invite your team to a repo and collaboration improved as they joined (layer one); publish it publicly and outside contributors could discover, fork, and open pull requests against it (layer two). Each team's private mini-network and every open-source project knitted into one giant, connected graph of developers.
How it solved it. The platform got more valuable with every repo and contributor added, which is why growth compounded rather than plateaued: from over 46,000 public repositories in its first year (announced February 2009) to roughly 2 million repositories by 2011, and 100M+ developers with 400M+ repositories today. New developers joined because the projects and people they needed were already there.
Moats: the accumulated developer graph, too expensive to recreate
The problem. Git hosting is a commodity. Anyone can run a Git server, and rivals eventually did, so hosting alone could never be defensible. GitHub needed a source of durability that a competitor could not simply copy with better features or lower prices.
The approach. GitHub let the moat accumulate as a byproduct of use: profiles, contribution graphs, stars, and forks turned the platform into a developer's public résumé, and every project and reputation added to the graph. The switching costs it created were social, not just technical, because leaving meant leaving your identity and your project's community behind.
How it solved it. The defensibility today is not the hosting but the structure: 100M+ developers, their reputations, and 400M+ repositories, a graph too costly for anyone to rebuild. That gravitational pull is precisely why GitLab and Bitbucket persist as alternatives yet never dethrone GitHub, and why Microsoft, when it acquired GitHub, promised to run it independently rather than risk breaking the neutrality the moat depends on.
Virality: stars and forks turned discovery into a self-reinforcing loop
The problem. A collaboration platform is only useful if developers can find the projects worth joining. Without a discovery mechanism, good open-source work stays invisible, contributors never arrive, and the network fails to compound.
The approach. GitHub made social signals the discovery engine. Stars and forks surfaced popular projects, ranked them, and made momentum visible, so a project gaining traction became more discoverable, attracting still more stars, contributors, and forks.
How it solved it. Popular projects went viral inside the network, pulling in yet more projects in a virtuous cycle: more projects attracted more developers, which surfaced and boosted more projects. This is the same loop that carried GitHub from tens of thousands of repositories in 2009 to millions within a few years, without a traditional marketing spend to match.
Differentiation: built how developers work, not what CTOs buy
The problem. The incumbent, SourceForge, ran on Subversion, where collaborating often meant emailing patches and hoping they applied. The tooling around code sharing was hostile, and competitors kept optimizing for buyers (CTOs, advertisers) rather than for the developers who actually lived in the tool every day.
The approach. The founders were scratching their own itch and optimized relentlessly for developer experience, throwing out assumptions about what a "source forge" should be. They turned collaboration itself (the pull request, the fork, the review) into the product, making the daily workflow the thing that was best-in-class.
How it solved it. Bottom-up adoption did the selling: developers used GitHub on side projects, then advocated for it at work, forcing the enterprise hand. By the time Bitbucket added Git support (October 2011) and GitLab launched (also 2011), GitHub already had the projects and the people, because it had won on how developers wanted to work rather than on what was easiest to sell.
Beachhead: free public repos as the wedge that seeded the graph
The problem. A collaboration network is worthless empty, and the hardest users to attract are the most influential ones: open-source maintainers whose presence pulls everyone else in. Charging everyone up front would have kept exactly those seed users away.
The approach. GitHub made public repositories for open-source projects free and monetized private repos, organizations, and enterprise later: "free for the commons, paid for the private." Open source was the deliberate loss-leader chosen to seed the entire developer graph with its most influential members first.
How it solved it. The free-public wedge put open-source maintainers on GitHub first, and they pulled in their contributors, teammates, and eventually employers. That beachhead compounded into the platform Microsoft agreed to acquire on June 4, 2018 for $7.5 billion in stock, with 28M+ developers on it, and installed Nat Friedman (Xamarin founder) as CEO, buying the network at the top of the developer funnel.