Skip to content

Instantly share code, notes, and snippets.

@ayr-ton
Created July 24, 2013 15:38
Show Gist options
  • Save ayr-ton/6071723 to your computer and use it in GitHub Desktop.
Save ayr-ton/6071723 to your computer and use it in GitHub Desktop.
Changing a commiter info in git history for all commits
#!/bin/bash
# Change the line four with the stuff that fit your needs
WRONGNAME = "wrong.name" ; NAME="Real Name"; EMAIL="real@email";
git filter-branch --env-filter 'if [ $GIT_COMMITTER_NAME = $WRONGNAME ]; then GIT_AUTHOR_EMAIL=$EMAIL; GIT_COMMITTER_NAME=$NAME; GIT_AUTHOR_NAME=$NAME; GIT_COMMITTER_EMAIL=$EMAIL; fi'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment