將 git committer 設定為等於 commit author

在給定提交範圍 commit1..commit2 的情況下,此命令會重寫歷史記錄,以便 git commit author 也成為 git committer:

git filter-branch -f --commit-filter \
   'export GIT_COMMITTER_NAME=\"$GIT_AUTHOR_NAME\";
    export GIT_COMMITTER_EMAIL=\"$GIT_AUTHOR_EMAIL\";
    export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\";
    git commit-tree $@' \
    -- commit1..commit2