我使用以下自定义日志格式来查看我的提交记录:
命令:
命令:
git log --pretty=format:"%C(auto)%h %<(8,trunc)%aN %Cgreen%s %+b"
3758d35 Daniel This commit does nothing
You really should remove it before commiting.
1. This is a line
2. This is another line
a191c2b Daniel Viral helvetica lomo, typewriter fashion axe
814a6a9 John Umami pork belly pickled, fanny pack yr keffiyeh fap YOLO
d5e130e Daniel Cardigan raw denim banjo
f7107d8 Daniel 90's ramps pinterest, craft beer blue bottle
除了我希望提交说明正文与提交标题对齐之外,它很好用。是否可能只使用git来实现这一点?
git log --pretty=format:"%C(auto)%h %<(8,trunc)%aN %Cgreen%s %n%w(80,17,17)%-b"
。我会将这个作为解决方案标记,并发布另一个关于结尾换行符的问题。非常感谢! - Daniel