Microsoft was not alone in chasing GitHub, which it agreed to acquire for $7.5 billion on Monday. Representatives from Alphabet's Google were also talking to the company about an acquisition in recent weeks, according to people familiar with the deal talks.
The talks for GitHub went on for several weeks, according to several other people familiar with the process, but at the end the auction was not close, suggesting Microsoft's bid was high enough to keep Google at bay. GitHub has, in the past, also attracted takeover interest from companies such as Amazon, according to people familiar with the matter.
These people declined to be named, as they were not authorized to discuss the deal with press.
Microsoft paid 25 times revenue for GitHub, said one person, which calculates to annual revenue of about $300 million for the code-sharing service, according to one of these people involved in the deal. Last August, the company said it had an annualized run rate of $200 million, and in October it said it was on track to book more than $100 million a year from its enterprise products alone.
Google and Microsoft declined to comment on the acquisition process.
Microsoft has seen its once-dominant Windows unit slip in market share in recent years, spurring a cloud-first reorganization and sending Microsoft looking for alternatives to court developers. Owning GitHub and LinkedIn also means that Microsoft now owns two top professional networks -- important in the continuing war for scarce tech talent.
While Google is making progress in its cloud efforts, the company has so far not made any big acquisitions in the cloud space under leader Diane Greene, who also sits on Alphabet's board of directors. This contrasts sharply with Microsoft's big acquisitions of GitHub and LinkedIn, which cost $26 billion.
Cloud applications company Salesforce has also grown in part through significant acquisitions, most recently paying $6.5 billion to buy Mulesoft, whose technology helps software developers stitch disparate applications together.
GitHub founder and former CEO Chris Wanstrath has limited his efforts to make money from the service out of a desire to give free tools to developers, but was drawn to Microsoft because of his relationship with CEO Satya Nadella, one person said. Since taking over Microsoft four years ago, Nadella has embraced open-source software and programmer tools to restore growth and attract third-party developers.
GitHub has been an acquisition target for years, and repeatedly spurned requests from companies including Microsoft, Google and Amazon, according to people familiar with the matter.
Atlassian, which has headquarters in Australia and the U.S., and China's Tencent are among other companies that made inquiries in recent years, said one of the people, who asked not to be named because the talks were confidential. Amazon and Atlassian declined comment. Tencent didn't respond to requests for comment.
"There has been interest in GitHub for a long time," said Peter Levine, a partner at the venture capital firm Andreessen Horowitz, which first backed GitHub in 2012. "They had lots of options. There's a real strategic fit at Microsoft." Levine would not name specific companies who had approached GitHub.
Andreessen invested $100 million into GitHub in 2012, the "largest single check we had ever written," Levine wrote in a blog post on Monday. A follow-on funding round in 2015, led by Sequoia Capital, valued GitHub at $2 billion.
Nadella won over Wanstrath in the last 24 months with his vision for GitHub fitting within Microsoft, one person close to the deal said. New CEO Nat Friedman, who joined Microsoft through a prior acquisition, plans to run GitHub independently for the time being.
That is similar to how Microsoft kept LinkedIn largely independent -- although GitHub will eventually become a part of Microsoft's growing commercial cloud business alongside products like Office 365 and Dynamics 365, Friedman told CNBC in an interview.
If anything, Microsoft wants GitHub to get even better at being GitHub, Friedman said.
GitHub has had ongoing conversations with Microsoft for several years, so the acquisition didn't begin with any single event, Wanstrath told CNBC. The companies have a shared mission to help developers be more efficient and more collaborative, he said.
Neither Friedman nor Wanstrath would comment on the acquisition process.