Skip to content

Instantly share code, notes, and snippets.

@vishaltelangre
Created April 21, 2013 19:04
Show Gist options
  • Save vishaltelangre/5430646 to your computer and use it in GitHub Desktop.
Save vishaltelangre/5430646 to your computer and use it in GitHub Desktop.
Modify past commit author details in git history
# change past commit's author email from 'vishal@blah.\(none\)' to '[email protected]'
git filter-branch --env-filter 'if [ $GIT_AUTHOR_EMAIL = vishal@blah.\(none\) ]; then [email protected]; fi; export GIT_AUTHOR_EMAIL'
# change past commit's author name from 'vishal' to 'Vishal Telangre'
git filter-branch --env-filter 'if [ $GIT_AUTHOR_NAME = vishal ]; then GIT_AUTHOR_EMAIL=Vishal\ Telangre; fi; export GIT_AUTHOR_NAME'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment