Skip to content

Instantly share code, notes, and snippets.

@maxvipon
Created November 5, 2014 07:17
Show Gist options
  • Save maxvipon/0cd8db5adf65e2976ae3 to your computer and use it in GitHub Desktop.
Save maxvipon/0cd8db5adf65e2976ae3 to your computer and use it in GitHub Desktop.
Change commit author or email
git filter-branch --commit-filter \
'if [ "$GIT_AUTHOR_NAME" = "OldAuthor Name" ]; then \
export GIT_AUTHOR_NAME="Author Name";\
export GIT_AUTHOR_EMAIL=authorEmail@example.com;\
export GIT_COMMITTER_NAME="Commmiter Name";\
export GIT_COMMITTER_EMAIL=commiterEmail@example.com;\
fi;\
git commit-tree "$@"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment