Is there a way to override a git author's display name in local repository config?

前端 未结 1 667

I have a git repository imported from subversion where users have names like H1234567. When I run git log or git blame I\'d prefer to see

1条回答
  •  太阳男子
    2021-01-22 01:34

    You can do this with a mailmap file, which can translate authors' name and email without modifying history.

    Create a file .mailmap at the repository root with the following:

    dave     H1234567 
    

    You can set different email address, or keep the original one.

    See Documentation/mailmap.txt for more.

    0 讨论(0)
提交回复
热议问题