Skip to content

Instantly share code, notes, and snippets.

@0xBEEB
Created June 29, 2015 22:09
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xBEEB/ffc58626631eb9d605e3 to your computer and use it in GitHub Desktop.
Save 0xBEEB/ffc58626631eb9d605e3 to your computer and use it in GitHub Desktop.
Goes through a git projects history and changes the name on commits. I needed this after changing my name, and coming out as transgender in order to have my name show up correctly to the public.
# Goes through a git projects history and changes the name on commits
# I needed this after changing my name, and coming out as transgender
# in order to have my name show up correctly to the public.
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "Existing Dead Name" ];
then
GIT_AUTHOR_NAME="Authentic Name";
GIT_AUTHOR_EMAIL="your@email.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