> For the complete documentation index, see [llms.txt](https://kennethfan.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kennethfan.gitbook.io/notes/git/git-xiu-gai-yi-ti-jiao-ji-lu-ti-jiao-zhe-xin-xi.md).

# git修改已提交记录提交者信息

git修改已提交记录提交者信息

```bash
git filter-branch --env-filter '
if [ "$GIT_COMMITTER_EMAIL" = "old.email@example.com" ]; then
    export GIT_COMMITTER_NAME="New Name"
    export GIT_COMMITTER_EMAIL="new.email@example.com"
fi
if [ "$GIT_AUTHOR_EMAIL" = "old.email@example.com" ]; then
    export GIT_AUTHOR_NAME="New Name"
    export GIT_AUTHOR_EMAIL="new.email@example.com"
fi
' -- --all

git push -f
```
