Regarding Github, you're right -- that is what I was trying to say. There's nothing wrong with linking work you've done - much to the contrary.
But I think a Github portfolio from a relatively inexperienced developer says "I'm an inexperienced developer" first, and requires a recruiter or whoever to actually click into repositories.
Linking directly to work you're proud of avoids that.