Say goodbye to old crufty commits from unknown@localmachine
git filter-branch --env-filter ' Thanks to StackOverflow for leading me to a solution to the historical commit username swap. If you mess up your git_rename.sh don't forget this panic button:
#!/bin/sh</p>
if [ "$GIT_COMMITTER_NAME" = "unknown" ];
then
export GIT_COMMITTER_NAME="user";
export GIT_COMMITTER_EMAIL="user@email.com";
fi
if [ "$GIT_AUTHOR_NAME" = "unknown" ];
then
export GIT_AUTHOR_NAME="user";
export GIT_AUTHOR_EMAIL="user@email.com";
fi'
</code>
git reset --hard refs/original/refs/heads/master