How to find a commit by message?

git log --grep='keyword'

To find a commit with a keyword in its message use git log --grep='keyword'.

Layer 1
Terminal Example
git log --grep='Adding'
commit be76365daf92a53296670e9df9621a72a10eef20
Author: Tom Ato
Date:   Wed May 19 07:36:14 2021 +0200

    Revert "Adding file.txt"

    This reverts commit 9cfff1809f12ebaf397074194187960c953330a4.

commit 16f0fe7675d0379c9374dc7f4efd4d0819364a16
Author: Tom Ato
Date:   Sat May 15 15:24:48 2021 +0200

    Adding image.png and README.md

commit 9cfff1809f12ebaf397074194187960c953330a4
Author: Tom Ato
Date:   Sat May 15 11:13:35 2021 +0200

    Adding file.txt

See git log to learn more about it.

Last modified on November 30, 2021.

You might also like