Assuming that in your latest commit you removed unwanted files and pushed that into github and that commit before is the one where you committed files that you do not want and your current state is satisfactory to you then you should be able to do something like this
git reset --soft HEAD~3
git commit
git push -f origin master
Where HEAD~3
refers to commit right before the one where you introduced bunch of unwanted files. The procedure described above essentially squashes you last two commits into one, but please be careful with git push -f
as this will override whatever it is that you have in github.