AdSense

網頁

2019/12/9

Git 查詢指定開發人員的提交紀錄 find commits log by author

Git列出特定開發人員的提交紀錄方法如下。


使用git log --author="<name>"指令可列出所在分支指定作者的提交紀錄,<name>為要查詢的人員名稱,例如git log --author="John Cena"

$ git log --author="John Cena"
commit 65bb5d578cd2c0785789dc4b13499fbadb81d15d (HEAD -> dev)
Author: John Cena 
Date:   Mon Dec 9 19:06:18 2019 +0800

    [Login] create admin and users

commit ea16810e328582773226a9abb8f29d8eb8dd0e44
Author: John Cena 
Date:   Mon Dec 9 18:45:31 2019 +0800

    [Login] create entity class

commit ef1a977770c28ead18e98b07e7a70186edc518cf
Author: John Cena 
Date:   Mon Dec 9 16:15:13 2019 +0800

    [Login] spring security settings


如果要看該作者在所有分支的提交紀錄,在後面加上--all參數,
也就是git log --author="John Cena" --all

參考:

沒有留言:

AdSense