Skip to content

Instantly share code, notes, and snippets.

@armno
Last active August 29, 2015 13:57
Show Gist options
  • Save armno/9678129 to your computer and use it in GitHub Desktop.
Save armno/9678129 to your computer and use it in GitHub Desktop.
change author name and email for old commits
# updated: i'm always fucked up with this command.
# from http://stackoverflow.com/questions/750172/how-do-i-change-the-author-of-a-commit-in-git
# or better, use this shell script from GitHub https://help.github.com/articles/changing-author-info
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='<newname>'; GIT_AUTHOR_EMAIL='<newemail>'; GIT_COMMITTER_NAME='<oldname>'; GIT_COMMITTER_EMAIL='<oldemail>';" HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment