This recipe works only if you did NOT PUSH.
Remove recent X (~1) commits without destroying your local changes:
git loggit reset --soft HEAD~1
at this time you can squash your multiple commits and commit with --amend flag.