The most simple and working solution i was able to find is removing the config file itself, git will generate it again so its fast and simple.
don't push till the very end.
rm ~/.gitconfig
Note: after doing this git will forget about your username and email so, run this command.
git will prompt this on your first fresh commit anyway, but don't forget to do this. the relation between you signed commit(via email) to account is very important.