The main fallacy here is assuming I need a portfolio at all. It's quite easy to get work without bothering with that. Or a resume. Or playing footsie with HR. You filter out some opportunities, yes. But have you SEEN the market for even decently competent programmers lately?<p>I put code on GitHub on the off chance someone else will find it useful or informative. Between the user base, platform usability, and the fact that I use git anyway, it's convenient for that. But "portfolio" isn't really a consideration.<p>If, for some reason, you want a portfolio anyway: my recommendation would be private website + GitHub. Preferably, in the form of writing an article demonstrating why a given project on GitHub is novel or interesting or useful. If you go that way, any off-the-shelf blogging tool should work (e.g. Jekyll / Octopress + GitHub Pages), and it will tend to be more useful to the community as large (which increases the odds of other devs explicitly being interested in working with you).
When you say "Github" do you mean it as a synecdoche to include the other well-known site hosts like Bitbucket, Gitorius and the venerable Sourceforge?<p>Or, to reference an old magazine cover, is it more of a "View of the World from 9th Avenue" thing? FWIW, all of my code is on Bitbucket.