Skip to content

Instantly share code, notes, and snippets.

@dylanmei
Created March 29, 2013 13:53
Show Gist options
  • Save dylanmei/5271001 to your computer and use it in GitHub Desktop.
Save dylanmei/5271001 to your computer and use it in GitHub Desktop.
overwrite author/commiter on commit history
#!/bin/bash
git filter-branch --env-filter '
if [ "$GIT_AUTHOR_NAME" = "old author" ];
then
GIT_AUTHOR_NAME="new author";
GIT_AUTHOR_EMAIL="<youmail@somehost.ext>";
fi
if [ "$GIT_COMMITTER_NAME" = "old committer" ];
then
GIT_COMMITTER_NAME="new commiter";
GIT_COMMITTER_EMAIL="<youmail@somehost.ext>";
fi
' -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment