Use case: I want to be able to develop in a private git repository (let's call this private-repo) as some the code in my project is sensitive and not for release to the public. I also want to be able to publish branches 'safe' where sensitive code has been removed to a public remote repository (public-repo).
To this end I have set up a private (private-repo) and public (public-repo) repositories on GitHub. I have completed my the removal of sensitive code in a branch (private-branch) in private-repo and pushed to my-app-v.1.0 in the same repository (private-repo). I then delete private-branch.
I now push my-app-v.1.0 from private-repo to a branch my-app-v.1.0 in the remote public-repo.
Given that my-app-v.1.0 never contained the sensitive code in either private-repo or public-repo, would it be possible for someone with advanced knowledge of Git to recover versions of the project containing sensitive code where they only have access to public-repo?
And also, if the answer to the above is no, is it necessary for me to delete private-branch in private-repo?
Hopefully the diagram clarifies the state of the repositories at the end of these operations.
