I have two repositories on GitHub – one public and one private. I would like to make publicly visible some of the code (in specific directories) in the private repo, ideally via the public repository.
Is this possible without having two copies of the code?
Sorry, its not possible to expose only certain directories of a git repository. You would have to host those directories separately. See a related question here (How do I clone a subdirectory?).