git

<< Back to wiki homepage

Table of contents:

Rewriting history (changing author name/email)

(first, install git-filter-repo)

git filter-branch --env-filter '
      if test "$GIT_AUTHOR_EMAIL" = "{OLD_MAIL_ADDRESS}"  # or whatever other condition you want
      then
              GIT_AUTHOR_EMAIL={NEW_MAIL_ADDRESS}
              GIT_COMMITTER_EMAIL={NEW_MAIL_ADDRESS}
              GIT_AUTHOR_NAME={NEW_NAME}
              GIT_COMMITTER_NAME={NEW_NAME}
      fi
      ' -- --all