LoginSignup
11
10

More than 5 years have passed since last update.

過去のコミットの Author 情報を変更する

Posted at

git filter-branch で過去ログを一括変更する

git filter-branch -f --commit-filter '
        if [ "$GIT_AUTHOR_EMAIL" = "before@mailaddress" ];
        then
                GIT_AUTHOR_NAME="Your Name";
                GIT_AUTHOR_EMAIL="after@mailaddress";
                git commit-tree "$@";
        else
                git commit-tree "$@";
        fi' HEAD

git push -f で強制 push する

git filter-branch 後に push するとエラーが出るので -f を付ける。

git push -f
11
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
10