0

Possible Duplicate:
How do I change the author of a commit in git?

I have push 5 commits but I want to change the author email adress I have push on the first commit.

Is that possible ?

Community
  • 1
  • 1
Manu
  • 809
  • 1
  • 9
  • 28
  • Yes, use `git filter-branch --env-filter`. The author and email are environment variables, just use the appropriate command. – fge Jan 04 '13 at 16:52

1 Answers1

2

I think you are looking for git filter-branch

You gotta decide for yourself if it's really worth the effort..

git filter-branch -f --commit-filter '
  if [ "$GIT_AUTHOR_EMAIL" = "wrongemail@adress.com" ];
  then
    GIT_AUTHOR_NAME="Firstname NAME";
    GIT_AUTHOR_EMAIL="email@adress.com";
    git commit-tree "$@";
  else
    git commit-tree "$@";
  fi' HEAD
Manu
  • 809
  • 1
  • 9
  • 28
gulty
  • 1,068
  • 1
  • 8
  • 14