Sourceforge's downfall was not finding a better business model than advertising – which has devolved into the worst kind of spammy ads. GitHub, on the other hand, has a solid business model that doesn't involve advertising. In fact, putting ads on the site would be suicide.