Skip to content

Instantly share code, notes, and snippets.

@suyan
Last active October 6, 2015 22:50
Show Gist options
  • Save suyan/46e1fbd0fd1d4c237a65 to your computer and use it in GitHub Desktop.
Save suyan/46e1fbd0fd1d4c237a65 to your computer and use it in GitHub Desktop.
update git history
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "test@test.com" ];
then
GIT_AUTHOR_NAME="First Last";
GIT_COMMITTER_NAME="First Last";
GIT_AUTHOR_EMAIL="user@user.com";
GIT_COMMITTER_EMAIL="user@user.com";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment