Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save francisco-perez-sorrosal/5122ea5be99fc71f2a8d8912a15ed921 to your computer and use it in GitHub Desktop.
Save francisco-perez-sorrosal/5122ea5be99fc71f2a8d8912a15ed921 to your computer and use it in GitHub Desktop.
Change the committer/author data in Git
#!/bin/sh
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "Francisco Perez-Sorrosal" ];
then
GIT_COMMITTER_NAME="Francisco Perez-Sorrosal";
GIT_AUTHOR_NAME="Francisco Perez-Sorrosal";
GIT_COMMITTER_EMAIL="fperezsorrosal@gmail.com";
GIT_AUTHOR_EMAIL="fperezsorrosal@gmail.com";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment