Skip to content

Instantly share code, notes, and snippets.

@lgrz
Created October 7, 2010 23:15
Show Gist options
  • Save lgrz/616086 to your computer and use it in GitHub Desktop.
Save lgrz/616086 to your computer and use it in GitHub Desktop.
#!/bin/sh
# http://stackoverflow.com/questions/392332/retroactively-correct-authors-with-git-svn
# Fix authors after svn export
git filter-branch --env-filter '
n=$GIT_AUTHOR_NAME
m=$GIT_AUTHOR_EMAIL
case ${GIT_AUTHOR_NAME} in
miked) n="Mike D" ; m="[email protected]" ;;
"someone") n="Adam Yauch" ; m="[email protected]" ;;
"(no author)") n="Adrock" ; m="[email protected]" ;;
esac
export GIT_AUTHOR_NAME="$n"
export GIT_AUTHOR_EMAIL="$m"
export GIT_COMMITTER_NAME="$n"
export GIT_COMMITTER_EMAIL="$m"
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment