【发布时间】:2016-12-10 21:25:23
【问题描述】:
我已经准备了一个别名,以便在 git 中获取简短的日志报告
# excerpt from ~/.gitconfig
[alias]
lg = log --all --oneline --graph --decorate --pretty='%C(auto)%h %Cgreen%ai %C(reset)%C(auto)%s %d'
git lg 每次提交都会生成一个不错的行,但没有关于用户的信息:
* 623beff 2016-11-14 14:18:36 +0100 extended plotstyle option and automatic colors
或截图:
但是我想在每一行看到提交者真实姓名的首字母(全名有时太长):
* 623beff 2016-11-14 14:18:36 +0100 (J.S.) extended plotstyle option and automatic colors
我怎样才能得到这个结果?
【问题讨论】:
标签: regex git logging configuration pretty-print