Well, I've made some stupid thing and I didn't add .idea folder to gitignore. Now I have 10 commits with this .idea rubbish and one, the last commit, which consciously adds .idea to gitignore. So, I'm trying to find a solution to clear all the previous commits from this .idea and I'm thinking of reorder the commits.
So, if I make my last commit, where .idea is added to gitignore, will it change all the other 10 following commits and make them without .idea files? If not, is there any other solution to clear these poor commits? Thank you in advance!