I have two different git branches: master and experimental. Both branches have their own changes and commits. In the experimental branch I tried out various different things (through different files and commits).
Now, I want to revert all the changes in the experimental branch and only keep one feature. I want to keep the (pruned) experimental branch and keep working on that until it is ready to be merged into master.
So far, I did a diff between the two branches (to see the changes) and did then ''git checkout master'' on the files in experimental I wanted to revert to master.
Is there a more efficient way?
What is the simplest way to revert the changes in all but a few files in the experimental branch to master?