Add/remove files to get things the way you want:
git rm classdir
git add sourcedir
Then amend the commit:
git commit --amend
The previous, erroneous commit will be edited to reflect the new index state - in other words, it'll be like you never made the mistake in the first place
Note that you should only do this if you haven't pushed yet. If you have pushed, then you'll just have to commit a fix normally.