Skip to content

Instantly share code, notes, and snippets.

@odeke-em
Created March 1, 2015 08:23
Show Gist options
  • Save odeke-em/1e80ea4f19323b2c2017 to your computer and use it in GitHub Desktop.
Save odeke-em/1e80ea4f19323b2c2017 to your computer and use it in GitHub Desktop.
#!/bin/bash
target_name="foo" # Remember to set your name here
target_email="foo@example.com" # Set the new email here
git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = $target_name ];
then export GIT_AUTHOR_EMAIL=$target_email;
fi; git commit-tree "$@"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment