We have some people with long names in our git commit logs. Currently, my format is
pretty = %C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset
which shows
276840c Kyle Heironimus Added updated hello world example. (3 months ago)
I really just want
276840c Kyle Added updated hello world example. (3 months ago)
开发者_如何转开发If I can't just take the first word of the author name, the first 5 characters would be my second choice.
Any way to do this?
If you use %aN rather than %an, Git will consider aliases listed in ~/.mailmap when displaying author names. If you create that file, and add, say -
Kyle <youremail@example.com>
then you should get the desired output.
精彩评论