Created
May 3, 2014 20:14
-
-
Save dmi3y/50c6db8084524b605e66 to your computer and use it in GitHub Desktop.
Rewrite wrong user commits in bulk http://git-scm.com/docs/git-filter-branch http://stackoverflow.com/questions/3401732/rewrite-author-in-history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git filter-branch --env-filter ' | |
if test "$GIT_AUTHOR_EMAIL" = "wrong@wrong" | |
then | |
GIT_AUTHOR_EMAIL=lapshukov@gmail.com | |
GIT_AUTHOR_NAME=dmi3y | |
export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME | |
fi | |
if test "$GIT_COMMITTER_EMAIL" = "wrong@wrong" | |
then | |
GIT_COMMITTER_EMAIL=lapshukov@gmail.com | |
GIT_COMMITTER_NAME=dmi3y | |
export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME | |
fi | |
' -- --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment