To fix an email address used for commits:
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
then
GIT_AUTHOR_NAME="John Doe";
GIT_AUTHOR_EMAIL="[email protected]";
git commit-tree "[email protected]";
else
git commit-tree "[email protected]";
fi' HEAD
To remove all history:
git reset $(git commit-tree HEAD^{tree} -m 'Initial commit')
More tools: