Skip to content

Instantly share code, notes, and snippets.

@eric-wieser
Forked from rabbidrabbit/rename.sh
Created March 13, 2012 20:18
Show Gist options
  • Save eric-wieser/2031294 to your computer and use it in GitHub Desktop.
Save eric-wieser/2031294 to your computer and use it in GitHub Desktop.
Rewrites the SR repos history
#!/bin/bash
git filter-branch -f --tag-name-filter cat --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
case an in
ew3)
an="Eric Wieser"
am="[email protected]";;
lt1)
an="Louis Taylor"
am="[email protected]";;
nd1)
an="Nic Dart"
am="[email protected]";;
rabbidrabbit|jl3)
an="Jonathan Laver"
am="[email protected]";;
esac
case cn in
ew3)
cn="Eric Wieser"
cm="[email protected]";;
lt1)
cn="Louis Taylor"
cm="[email protected]";;
nd1)
cn="Nic Dart"
cm="[email protected]";;
rabbidrabbit|jl3)
cn="Jonathan Laver"
cm="[email protected]";;
Apache)
cn="$an"
cm="$am"
esac
export GIT_AUTHOR_NAME="$an"
export GIT_AUTHOR_EMAIL="$am"
export GIT_COMMITTER_NAME="$cn"
export GIT_COMMITTER_EMAIL="$cm"
' -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment