Could I change my name and surname in all previous commits?

后端 未结 6 1207
春和景丽
春和景丽 2020-11-27 08:57

I would like to change my name, surname and email in my all commits, is it possible?

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 09:54

    With Git 2.24 (Q4 2019), git filter-branch (and BFG) is deprecated.

    The equivalent would be, using newren/git-filter-repo, and its example section:

    cd repo
    git filter-repo --mailmap my-mailmap
    

    with my-mailmap:

    Correct Name  
    

    That would replace the author name and email of any commit done by anyone with

    See git shortlog mapping author section for the exact syntax of

提交回复
热议问题