Created
June 29, 2015 22:09
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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="[email protected]"; | |
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