Skip to content

Instantly share code, notes, and snippets.

@shivabhusal
Created May 29, 2017 11:00
Show Gist options
  • Select an option

  • Save shivabhusal/28ad3e293ee14f5e45c78ea9224ba9f5 to your computer and use it in GitHub Desktop.

Select an option

Save shivabhusal/28ad3e293ee14f5e45c78ea9224ba9f5 to your computer and use it in GitHub Desktop.
This will update all the commits with new information
git filter-branch --commit-filter \
'if [ "$GIT_AUTHOR_EMAIL" = "old_email" ]; then \
export GIT_AUTHOR_NAME="Shiva Bhusal";\
export GIT_AUTHOR_EMAIL=new_emil;\
export GIT_COMMITTER_NAME="Shiva Bhusal";\
export GIT_COMMITTER_EMAIL="[email protected]";\
fi;\
git commit-tree "$@"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment