Skip to content

Instantly share code, notes, and snippets.

@atton
Last active October 30, 2017 00:27
Show Gist options
  • Save atton/4a085120554870506a4b9749f18b2f2b to your computer and use it in GitHub Desktop.
Save atton/4a085120554870506a4b9749f18b2f2b to your computer and use it in GitHub Desktop.
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
then
GIT_AUTHOR_NAME="atton";
GIT_AUTHOR_EMAIL="[email protected]";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='atton'; GIT_AUTHOR_EMAIL='[email protected]'; GIT_COMMITTER_NAME='atton'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment