Microsoft shares rose almost 1 percent to hit a record high of $101.79.
GitHub, founded in 2008 and based in San Francisco, was created largely as a community for software developers to share programming tools and code. The acquisition should help Microsoft expand its focus on developing AI, tools and services that work across devices.
GitHub will operate independently, Nadella said, and former Xamarin CEO and current Microsoft employee Nat Friedman will take over as CEO. One developer told Quartz he was concerned that Microsoft would use its ownership of the platform to monitor trends in software development in order to launch rival products, using largesse to preclude competition. GitHub is home for modern developers and the world's most popular destination for open source projects and software innovation. Microsoft's CEO, Steve Ballmer, has even been quoted calling Linux a "cancer" in the past.
As Microsoft built its business on proprietary software such as the Windows operating system, it came to be seen as an antagonist to the open-source philosophy of free software written by a collaborative community of developers. This deal will mark another dramatic step in that direction. GitHub began by focusing on open-source software but has since branched into services that let large companies like Facebook use it for more sensitive, proprietary projects. (AMZN) and Alphabet Inc.
This is Microsoft CEO Satya Nadella's second largest acquisition after the company bought professional social media network LinkedIn for $26.2 billion two years ago. In three quarters of 2016 it lost $66 million. Furthermore, it has been looking for a new CEO for the last nine months.
But Chief Executive Officer Satya Nadella downplayed those concerns by saying on a conference call that GitHub will continue to be an open platform that works with all public clouds.
It now counts about 27 million software developers around the world who use its platform to share code and build businesses.
One person familiar with the discussions between the companies told CNBC that they had been considering a joint marketing partnership valued around $35 million, and that those discussions had progressed to a possible investment or outright acquisition.