random bash scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
465 B

  1. #!/usr/bin/env bash
  2. git filter-branch -f --env-filter '
  3. OLD_EMAIL="$1"
  4. CORRECT_NAME="Cian Butler"
  5. CORRECT_EMAIL="butlerx@notthe.cloud"
  6. if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
  7. then
  8. export GIT_COMMITTER_NAME="$CORRECT_NAME"
  9. export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
  10. fi
  11. if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
  12. then
  13. export GIT_AUTHOR_NAME="$CORRECT_NAME"
  14. export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
  15. fi
  16. ' --tag-name-filter cat -- --branches --tags