Skip to content

Instantly share code, notes, and snippets.

@chuangx
Created March 31, 2015 19:05
Show Gist options
  • Save chuangx/c0066edcf886645c3d03 to your computer and use it in GitHub Desktop.
Save chuangx/c0066edcf886645c3d03 to your computer and use it in GitHub Desktop.
Git log author/email ammend
#!/bin/sh
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "origin_name" ]
then
GIT_COMMITTER_NAME="new_name";
GIT_AUTHOR_NAME="new_name";
GIT_COMMITTER_EMAIL="new_name_email";
GIT_AUTHOR_EMAIL="new_name_email";
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