Skip to content

Instantly share code, notes, and snippets.

@SamyCoenen
Last active March 29, 2018 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamyCoenen/22b12c2f7e1d1eaf17835fc47031ad0b to your computer and use it in GitHub Desktop.
Save SamyCoenen/22b12c2f7e1d1eaf17835fc47031ad0b to your computer and use it in GitHub Desktop.
Change the git author in all the commits with a certain filter
# Author: Samy Coenen
# Company: Gluo NV
git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "old_author" ];
then export GIT_AUTHOR_NAME="New Name"; export GIT_AUTHOR_EMAIL=new_email@example.com;
fi; git commit-tree "$@"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment