Skip to content

Instantly share code, notes, and snippets.

@RhubarbSin
Created January 19, 2014 16:46
Show Gist options
  • Save RhubarbSin/8507377 to your computer and use it in GitHub Desktop.
Save RhubarbSin/8507377 to your computer and use it in GitHub Desktop.
An attempt to rewrite author/comitter name/email for all commits in a git repo
#!/bin/sh
git filter-branch --env-filter '
cn="Rhubarb Sin"
cm="rhubarbsin@gmail.com"
an="Rhubarb Sin"
am="rhubarbsin@gmail.com"
export GIT_AUTHOR_NAME="$an"
export GIT_AUTHOR_EMAIL="$am"
export GIT_COMMITTER_NAME="$cn"
export GIT_COMMITTER_EMAIL="$cm"
' -f -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment