Change git email for previous commits

后端 未结 2 1698
情深已故
情深已故 2020-12-24 15:19

So I read a lot about how to change previous commit\'s email address but for some reason mine is not updating.

I did like 40 commits to my private repo with my loca

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 15:51

    You can indeed do his for many commits at once like this:

    git rebase -i HEAD~40 -x "git commit --amend --author 'Author Name ' --no-edit"
    

    I worked this out better in this answer.

提交回复
热议问题