I have a GIT repo with code which has files with sensitive information inside them. This repo never meant to be public, until now.
Main question: How to make this repo public without files with sensitive information, but keeping it able to receive updates?
My idea was somehow to organise this: I will have two remotes for same repo. One for public, another for myself - private.
When I work, I checkout the private with all the files including ones with sensitive information.
When I need to publish the update, I checkout the public, merge changes from my private (except files with sensitive information) and push the changes back to public repo.
Is this possible at all?