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