Companies had been hosting their own CVS or later svn servers.
I've been sharing GPL projects since 1999. We didn't need peek and poke (Both of which I have also used further in history...), but we managed nevertheless.
Prior to github I shared software on sourceforge (and others). Prior to that I published stuff on Freshmeat.
Prior to that I downloaded games others shared (not open source) on Happy Puppy.
Prior to that I used usenet to find and download games, shareware, etc.
Prior to that I used ftp to (IIRC) ftp.sunsite.edu, ftp.nic.fi, and others.
Prior to that I got news of new releases using Gopher.
Finally, prior to that, I actuallyy did use peek and poke to write software :-/
If github went away, and centralised repos went away, we'd still have something...