Skip to content

Instantly share code, notes, and snippets.

@priscillamc
Created April 15, 2015 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save priscillamc/86d2cdc5bbaf2ef1ce45 to your computer and use it in GitHub Desktop.
Save priscillamc/86d2cdc5bbaf2ef1ce45 to your computer and use it in GitHub Desktop.
Git fix email settings in branch
git config --global user.email
git config --global user.email "username@users.noreply.github.com"
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "email@example.com" ];
then
GIT_AUTHOR_NAME="username";
GIT_AUTHOR_EMAIL="username@users.noreply.github.com";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
git push origin branch -f
@napieraj
Copy link

NICE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment