Change Author of Git Repository

by Stephen Fluin 2009.12.16

Sometimes when migrating git repositories around, or when importing older version control systems into git, the author history would be nice to update to be forward looking.

CVS to git conversation

git cvsimport -v -a -d /path/to/cvsroot/ -C newgitrepo.git ModuleName

Rewrite git authors

git filter-branch --commit-filter '
        if [ "$GIT_COMMITTER_NAME" = "PeEll" ];
        then
                GIT_COMMITTER_NAME="New Name";
                GIT_AUTHOR_NAME="New Name";
                GIT_COMMITTER_EMAIL="new.email@example.com";
                GIT_AUTHOR_EMAIL="new.email@example.com";
                git commit-tree "$@";
        else
                git commit-tree "$@";
        fi' HEAD

permalink