git log filter(六)
显示前10条提交记录:
root@vmuer-VirtualBox:/media/vmuer/share/cmake-uart-server# git log -10
commit b056dacb0913d9446ee3e607c4c82347c721d70e (HEAD -> master, origin/master)
Author: panzidong <panzidong>
Date: Tue Oct 15 15:25:19 2019 +0800
#AHB-35 optimize code
commit 0ca7a8499d3c5f67d3ce3b17faa5c00dac83951c
Author: panzidong <panzidong>
Date: Tue Oct 15 14:26:02 2019 +0800
+AHB-34 optimize code
commit 0b998e631d9a66748e948edcbe4b818d58d58625
Author: panzidong <panzidong>
Date: Tue Oct 15 14:13:15 2019 +0800
*AHB-33 fix bug uart read
commit 4120e86cebd7c3cb66dc99e944540d5af3ca510c
Author: panzidong <panzidong>
Date: Tue Oct 15 13:14:38 2019 +0800
#AHB-32 option optimize
commit c29f30944ccd740ecf9109a89dd7024b5e8b7f49
Author: panzidong <panzidong>
Date: Mon Oct 14 17:20:42 2019 +0800
#AHB-31 code format
commit 0dca2f478197f8fe6172eacfca7a64806ead9072
Author: panzidong <panzidong>
Date: Mon Oct 14 16:06:58 2019 +0800
*AHB-30 fixed compile error
commit 108f6d1174f6825339627d097cfb456600871080
Author: panzidong <panzidong>
Date: Mon Oct 14 16:04:33 2019 +0800
+AHB-30 add tcp_client for slave test
commit b71d63dd5433d6c69bec6597b633cac99cd6d25b
Author: panzidong <panzidong>
Date: Mon Oct 14 15:55:22 2019 +0800
通过--pretty来过滤,比较常用的如下所示:
%an 显示提交作者
%s 显示提交说明
%h显示提交的hash短码
# git log -10 --pretty=format:"commit %h author:%an %s"
commit b056dac author:panzidong #AHB-35 optimize code
commit 0ca7a84 author:panzidong +AHB-34 optimize code
commit 0b998e6 author:panzidong *AHB-33 fix bug uart read
commit 4120e86 author:panzidong #AHB-32 option optimize
commit c29f309 author:panzidong #AHB-31 code format
commit 0dca2f4 author:panzidong *AHB-30 fixed compile error
commit 108f6d1 author:panzidong +AHB-30 add tcp_client for slave test
commit b71d63d author:panzidong +AHB-29 add tcp_client for support host test case
commit 84ce0f5 author:panzidong +AHB-28 New feature UART_SERVER_vERSION_PATCH
commit d252d8f author:panzidong #AHB-27 Change UART_SERVER_VERSION_PATCH