Add a new script to rename the commit username of a git repo.
This commit is contained in:
parent
cb520c65ef
commit
596fdf9f85
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
git filter-branch --commit-filter '
|
||||||
|
if [ "$GIT_COMMITTER_NAME" = "OLD_USERNAME" ];
|
||||||
|
then
|
||||||
|
GIT_COMMITTER_NAME="NEW_USERNAME";
|
||||||
|
GIT_AUTHOR_NAME="NEW_USERNAME";
|
||||||
|
GIT_COMMITTER_EMAIL="EMAIL_NEW_USERNAME";
|
||||||
|
GIT_AUTHOR_EMAIL="EMAIL_NEW_USERNAME";
|
||||||
|
git commit-tree "$@";
|
||||||
|
else
|
||||||
|
git commit-tree "$@";
|
||||||
|
fi' HEAD
|
Loading…
Reference in New Issue