Medium's policy is more or less to get a non exclusive license and copyright on your content, and they can transfer these to any entity they want.
Github's policy is to not interfer with property or copyright and allow anyone to view/copy/fork your content, which in itself shouldn't transfer any rights.
The two seem very different and Github is basicaly saying that you'll have to sort out the licensing and other legal issues by yourself. So you have to do the work (setting a license and ownership, eventualy copyright) but how is it scary ?
Note that Github isn't in the user generated content business, primarily, so they are less at risk by leaving the terms loose and human. I would generally prefer Medium's terms, but written / translated into non-legalese. Some company did this a few years ago, I wish I could find it.
Any company that relies on user generated content needs users to agree to what Medium's legalese says. At least it's explicit. Assuming you own the copyright to content you put on Medium, how else can they publish it? Github's language is informal, and not written in terms of copyright, but is functionally the same ... though the full term isn't included in the parent:
> We claim no intellectual property rights over the material you provide to the Service. Your profile and materials uploaded remain yours. However, by setting your pages to be viewed publicly, you agree to allow others to view your Content. By setting your repositories to be viewed publicly, you agree to allow others to view and fork your repositories.