There was a project I did with some colleagues, which consisted of multiple sub-projects. All these sub-projects except one will have to be totally erased because of their content. This last project we'd like to make public. It happens to be the case that this sub-project had its own folder. What I want to do is erase all commits except those that affected this folder from our commit history, and make the repository public. I could just make a new repository but I'd like to keep all the commits to this project intact so we can work with it like we can with normal projects.
Is there a simple way to either keep only those commits that affected a certain folder, or another easy way to select only a few commits to keep instead of having to go over all of them one by one and either erase them or not?