Richard Mathew Stallman (RMS) who is widely known as the founder of Free Software Foundation (FSF) and GNU is Not Unix (GNU) project, wrote an email  to GNU mailing list 3 years back, asking developers not to use GitHub for hosting their source code and instead asks them to find a better alternative.
Why did he say that? Because, is he some kind of prophet who knows that Microsoft will acquire a platform like GitHub in the future? No! The primary contradiction in this case is that, Github which started as a platform to help developers of Free/Libre & Open Source Projects itself is neither a Free Software nor Open Source Software!
But they started attracting various FOSS communities including Mozilla, The Linux Kernel (maintains their mirror there), etc., All of the sudden, it become a place for developers to figure out FOSS projects, start contributing and host their own. I remember reading an article on CNET titled, "Forget LinkedIn, Companies turn to Github to find Tech Talent" back in 2012. A developers profile on GitHub along with their contributions towards public projects was valued (and still being) more than the information that they have provided in their Resume when they applied to software development jobs.
Even a company like Google, who had their own code hosting platform , had shutdown it's service and moved some of their projects to GitHub as well. There was even a popular trend among developers who understood that FOSS is empowering their skills and knowledge started ignoring tools or services which are proprietary and comes from organizations that promote proprietary software rather than a FLOSS. This in-turn created another trend among the companies who started publishing some of their projects source code under a FLOSS license and wanted to stay alive among developers. It's a strategic move by these companies based on market conditions and not based on the principles or philosophy behind FLOSS.
It includes Microsoft as well! Back in the early 2000-2001 Microsoft's Steve Ballmer called GNU/Linux and the Free Software ecosystem as Cancer and even attributed the nature of GNU GPL to Communism! . And 12 years later, they ridiculed themselves being one of the Top 20 contributors to the Linux kernel itself!  The market trends started changing in those decades. The Internet, Web and FLOSS had grown together. It was evident that the connectivity the Internet and Web provided had brought developers together crossing national boundaries and changed the way they develop and produce software. From that point, software production was in a sense democratized that they are no longer constrained within the walls of tech corporations but was out in the open. Soon after this another trend started emerging in the name of Cloud Computing.
In order to keep pace with the fast changing domain, Microsoft and similar companies had to restrain from their previous stands. The market forces compelled them for a change. Soon after Satya Nadella was made CEO of Microsoft he made announcements like "Microsoft Loves Linux". This announcement again comes in the background of Microsoft's launching of it's own cloud platform called Azure where GNU/Linux was the primary operating system demanded by developers who operate in the cloud. Steve Ballmer, once again came out and said "I may have called Linux a cancer but now I love it" as quoted in ZDNET.
All of the sudden Microsoft started embracing Open Source (not Free Software) not because of the principles again, but because of the demand by capital and market conditions for profit and for their survival. Today, Microsoft has announced that they are acquiring the proprietary source code hosting and development platform GitHub and more than surpise, it had come as shock to a lot of developer communities. The developers seems to be disappointed and worried about this move and it was evident by the trended hashtag #movingtogitlab on Twitter  and Fediverse . Gitlab is an FLOSS alternative to GitHub and developers started migrating to it as reported by GitLab .
There were also creative memes that was trending . It was also mentioned that GitHub has been valued at $7.5 billion in this acquisition and GitHub said they are happy about it. "They" here refers to the board members, venture capitalists and angel investors. They are happy about it while the developer community is raging aginst this move.
We should be raising few questions on this moment. What would attract another company to acquire another companies product, if not for the value they see in? If it has a value, who and what had created that value? Is it just the developers and marketting folks at GitHub (or) is that the whole developer community who have their accounts and actively developing software in GitHub? Would a company buy a product of another company at higher price if there were no active users? If both the developers who built the platform and the users (in this case are also developers who uses the platform) are those who brought such value for this product, then it is certainly beaurocratic and undemocratic that their consents have never been sought and when it happens, the other side rages and starts their counter action. Moving to Gitlab is a political stance by the developer community. It is their way of resisting back. The developer community should have listened to the early warnings of RMS and shouldn’t have chosen a proprietary platform for development and hosting of FLOSS projects.
Given the past records and u-turns of Microsoft why would the community trust them, no matter how much they come in disguise? The Free Software movement is a bottom-up movement with the principles of Freedom at it's core, while the changes happening in these top tech companies are top-down and they both clash with each other. Because the top-down management can any time will make another u-turn if the capital profit and the market conditions demands them to do so. Therefore they cannot be trusted and the alternative lies on building a decentralized & federated solutions to these centralized platforms. The hacker and developer community needs to stay vigilant about the moves of these monopolies.
Apart from GitLab, Gogs, Gitea, GitTorrent and git-ssb are other examples for alternatives. Seek alternatives, if there is none, build many.