However, my interviewer told me "we've seen your code on Github. It's great, but just so you know, you won't be able to keep that up if you work here."
I asked more about what he meant by this and he told me that the company is extremely secretive and would not allow me to post any code to Github. Some other developers had already been told to take down some (very general, non-proprietary) code they had posted to Github.
What came out is that my public work on Github helped me get an offer but I wasn't going to be able to contribute any new code during my years at this company.
I certainly don't want a three-year blank spot in my public code "resume", so I turned down the offer.
This is a bit of the tangent from the OP's point, but I think its related: Companies need to realize that the benefit of allowing employees to contribute to open-source isn't merely getting the community to work or review your team's code, but rather, open-source is a marketing and recruiting tool.
Say you let your employees create and maintain open-source software. Say it is successful and other people start using that software. If it used widely enough, your employees are asked to speak at meetups and conferences and say "Look at this great software I built while working at company X. Company X is so cool, come work here!" (and every contributor to the project becomes a potential employee who will already know a portion of your code.)
tl;dr - Companies: allow your employees to freely work on open-source and it will improve your recruiting.