Skip to content

Instantly share code, notes, and snippets.

@scari
Created January 13, 2015 11:04
Show Gist options
  • Save scari/1aa3d43ac367b711b719 to your computer and use it in GitHub Desktop.
Save scari/1aa3d43ac367b711b719 to your computer and use it in GitHub Desktop.
git_change_author.sh
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<Younggun Kim>" ]; then # This is my filter condition. Specify your own condition here
GIT_COMMITTER_NAME="<Younggun Kim>";
GIT_AUTHOR_NAME="<Younggun Kim>";
GIT_COMMITTER_EMAIL="<my_email_address>";
GIT_AUTHOR_EMAIL="<my_email_address>";
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