Skip to content

Instantly share code, notes, and snippets.

@rise-worlds
Last active November 26, 2020 11:39
Show Gist options
  • Save rise-worlds/eb4949899abd9f0aa3046a9150100e70 to your computer and use it in GitHub Desktop.
Save rise-worlds/eb4949899abd9f0aa3046a9150100e70 to your computer and use it in GitHub Desktop.
#!/bin/bash
git filter-branch --env-filter '
OLD_EMAIL="rise.worlds@outlook.com"
NEW_NAME="a42dab9659090cac"
NEW_EMAIL="a42dab9659090cac@outlook.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
# git gc
# git push --force --tags origin 'refs/heads/*'
@rise-worlds
Copy link
Author

rise-worlds commented Sep 27, 2019

git push --force --tags origin 'refs/heads/*'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment