sebastiangiro

Fix bad commits

Feb 23rd, 2021
754
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh                                                    
  2.  
  3. git filter-branch --env-filter '
  4. OLD_EMAIL="old@gmail.com"
  5. CORRECT_NAME="Author Name corrected"
  6. CORRECT_EMAIL="correct@gmail.com"
  7. if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
  8. then
  9.    export GIT_COMMITTER_NAME="$CORRECT_NAME"
  10.    export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
  11. fi
  12. if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
  13. then
  14.    export GIT_AUTHOR_NAME="$CORRECT_NAME"
  15.    export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
  16. fi
  17. ' --tag-name-filter cat -- --branches --tags
RAW Paste Data