Skip to content

Instantly share code, notes, and snippets.

@boxnos
Created May 17, 2013 08:32
Show Gist options
  • Save boxnos/5597769 to your computer and use it in GitHub Desktop.
Save boxnos/5597769 to your computer and use it in GitHub Desktop.
gitのメールアドレスをががっと変更する。
#!/bin/sh
for repo in $(find `pwd` -type d -name '.git'); do
cd $repo
cd ../
pwd
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "hoge@hoge.com" ];
then
GIT_AUTHOR_NAME="foo";
GIT_AUTHOR_EMAIL="foo@foo.com";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment