I believe that Github could've done their own IPO at some point. They could've "made it" as an independent company, in that respect, without profits...
And after the proceeds from the IPO have been spent?
The great think about equity is you can keep issuing more of it, doing secondary offerings, diluting existing stockholders, and raising more money until your stock price has gone to zero. That takes decades.