git log - 특정 author의 commit 리스트만 출력

터미널에서 git log 명령어로 로그를 확인할 때, 특정 author가 반영한 commit 리스트만 확인하는 방법을 소개합니다.

1. 특정 author의 commit만 확인

git log --author=AUTHOR_EMAIL 명령어는 AUTHOR_EMAIL가 반영한 commit 리스트만 필터링하여 출력합니다.

예를 들어, 아래와 같이 입력하면 riddlehsu@google.com가 반영한 commit들만 출력됩니다.

$ git log --author="riddlehsu@google.com"

commit 0a9ff046af725329e096dc94778fd86f22eeb6dd
Author: Riddle Hsu <riddlehsu@google.com>
Date:   Sat Jul 25 01:44:51 2020 +0800

    Remove home snapshot immediately

    If the size of snapshot is mismatched, the removal of the starting
    window will be deferred. But if the snapshot target is home, since
    it is only presented for unlocking, it is better to dismiss it as
    soon as possible to avoid outdated content from being shown on screen
    if the windows of home have drawn.

commit 06a619b9910071dac16d06d40669672756e7b99b
Author: Riddle Hsu <riddlehsu@google.com>
Date:   Mon Aug 10 16:21:16 2020 +0800

    Resume next activity if pausing app died

    If the top activity is crashed before showing any window, when its
    process reported dead, it will be regarded as no visible activity
    and no need to resume next activity. That may lead to the next top
    activity remains in paused state and may be unresponsive.

commit 7cab6acae9b6190ca6c0606a19e2d7e7631c5345
Merge: 732f43e51e9 2d695313c90
Author: Riddle Hsu <riddlehsu@google.com>
Date:   Tue Jul 7 07:58:38 2020 +0000

    Merge "Fix boot timeout and reduce boot time" into rvc-dev am: 2d695313c9
....

2. 두명 이상의 author의 commit 리스트 출력

만약 두명 이상의 author들에 대해서 필터링하고 싶다면, 다음과 같이 다수의 author를 인자로 전달하면 됩니다.

$ git log --author="AAA@example.com" --author="BBB@example.com" --author="CCC@example.com"
Loading script...
codechachaCopyright ©2019 codechacha