The deal, which is Microsoft’s largest since the $26bn acquisition of LinkedIn in 2016, is a big bet on its fast-growing cloud business that competes with market leader Amazon.com.
The software giant's Azure cloud platform reported a 93percent growth in revenue in the third quarter ended March 31.
“Microsoft’s purchase of GitHub could provide tools for users to develop applications on its Azure Cloud platform,” said Ivan Feinseth, the chief investment officer at markets research firm Tigress Financial Partners.
GitHub supplies coding tools for developers and calls itself the world’s largest code host, with more than 28million developers using its platform.
After the deal closes, GitHub will become a part of Microsoft’s Intelligent Cloud unit.
Microsoft’s Nat Friedman will take over as the chief executive of San Francisco-headquartered GitHub, whose current chief executive Chris Wanstrath will become a Microsoft technical fellow.
After reports of a likely deal between Microsoft and GitHub emerged on Sunday, some users of the software development platform raised doubts on social network Reddit that GitHub would “eventually favour Microsoft products over competing alternatives”.
However, Microsoft said yesterday that GitHub would operate independently and developers would be able to deploy their code to any operating system, cloud and device.
“Microsoft is a developer-first company and by joining forces with GitHub we strengthen our commitment to developer freedom, openness and innovation,” said Microsoft chief executive Satya Nadella.
Last year, the software giant shut down CodePlex, its own rival for GitHub, saying the latter was the dominant location for open source sharing and that most such projects had already migrated there.
On an adjusted basis, Microsoft expects the deal to add to its operating income in fiscal 2020 and reduce earnings per share by less than 1percent in 2019 and 2020. The transaction is expected to close by the end of the calendar year.
Microsoft shares were up nearly 1percent at a record high of $101.78.