Moving the mistakenly committed files back to the staging area from the previous commit, without canceling the changes done to them. This can be done by using
git reset --soft HEAD^
or
git reset --soft HEAD~1
To leave that unwanted file just reset it using
git reset HEAD path/to/unwanted_file
Now you can commit those files
git commit -c ORIG-HEAD
Note: you can give the same commit message also.