I was writing a simple script in the school computer, and committing the changes to Git (in a repo that was in my pendrive, cloned from my computer at home). After several c
I use the following to rewrite the author for an entire repository, including tags and all branches:
git filter-branch --tag-name-filter cat --env-filter "
export GIT_AUTHOR_NAME='New name';
export GIT_AUTHOR_EMAIL='New email'
" -- --all
Then, as described in the MAN page of filter-branch, remove all original refs backed up by filter-branch
(this is destructive, backup first):
git for-each-ref --format="%(refname)" refs/original/ | \
xargs -n 1 git update-ref -d