Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Rob Sa
Added: Aug 31, 2019 7:26 AM
Modified: Aug 31, 2019 7:27 AM
Views: 5
Tags: no tags
  1. git filter-branch --env-filter '
  2. WRONG_EMAIL="rob.savage@morphsites.com"
  3. NEW_NAME="Rob Savage"
  4. NEW_EMAIL="robert@crowd9.com"
  5.  
  6. if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
  7. then
  8.    export GIT_COMMITTER_NAME="$NEW_NAME"
  9.    export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
  10. fi
  11. if [ "$GIT_AUTHOR_EMAIL" = "$WRONG_EMAIL" ]
  12. then
  13.    export GIT_AUTHOR_NAME="$NEW_NAME"
  14.    export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
  15. fi
  16. ' --tag-name-filter cat -- --branches --tags;
  17.  
  18. # you'll need to do a force push if happy with the rebase above
  19. #git push --force;