Skip to content

Instantly share code, notes, and snippets.

@cristopher-rodrigues
Last active August 29, 2015 14:14
Show Gist options
  • Save cristopher-rodrigues/ac9bb5c3fc33799f882f to your computer and use it in GitHub Desktop.
Save cristopher-rodrigues/ac9bb5c3fc33799f882f to your computer and use it in GitHub Desktop.
[git] rename commit
git filter-branch --commit-filter
'
if [ "$GIT_COMMITTER_NAME" = "cristopher" ];
then
GIT_COMMITTER_NAME="cristopher-rodrigues";
GIT_AUTHOR_NAME="cristopher-rodrigues";
GIT_COMMITTER_EMAIL="cristopher.rodrigues993@gmail.com";
GIT_AUTHOR_EMAIL="cristopher.rodrigues993@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