我一直在玩你可以用Git日志做的自定义,我想我已经为我确定了正确的日志。但是,我不知道如何标记整个git消息。我可以在第一行执行此操作,并假设整个git消息是一个长字符串。
此外,是否可以输出整个git提交消息,类似于Git log默认的方式?也就是说,每行消息一行。
默认的Git日志:
commit 3246e9dfcf80d8edada9a559684b528658b8ccf5
Author: Reid
Date: Thu Jun 9 16:30:35 2016 -0400
Refactored Loading Indicators
commit 219a67a34036b40d18091ea3a1df6417c5feb245
Author: Reid
Date: Fri Jun 3 14:50:59 2016 -0400
Filter out Promotions < 0
Submission of Promo Code working with error messages
Refactored Loading Indicators
Limit 1 promo code per order via Mini Cart
Cart stays open if they change quantity of item
Migrated Drawer Animation to an Extension
Hooked into hideAllNavigation()
Dynamically Set Items Container Height
Implement the Mini Cart Experience Flag
我的自定义git日志格式:
3246e9d 2016-06-09 [Reid]
Refactored Loading Indicators
219a67a 2016-06-03 [Reid]
Filter out Promotions < 0 Submission of Promo Code working with error messages Refactored Loading Indicators Limit 1 promo code per order via Mini Cart Cart stays open if they change quantity of item Migrated Drawer Animation to an Extension Hooked into hideAllNavigation() Dynamically Set Items Container Height Implement the Mini Cart Experience Flag
我在git config中的自定义git日志别名:
[alias]
logg = log --pretty=format:'%C(197)%h%Creset %C(039)%ad%Creset %C(177)[%an <%ae>]%Creset%n%n\t%s%n' --date=short
答案 0 :(得分:3)
答案 1 :(得分:0)
我找到了,只是追加前。在您要格式化的文本选择前面%w(80,9,9)
。宽度是第一个#,第二个是第一行缩进,第三个是每隔一行的缩进。
帮助描述解决方案的链接。