Tsallaka zuwa abun ciki
Justice Tech School

Filtering the Log

Filter by author, message text, date or path. A path after -- limits the log to commits touching that file.

Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
echo y > b.txt && git add b.txt && git commit -qm 'Add b'
git log --format=%s --grep='Add'
git log --format=%s -- a.txt
git log --format=%s --author=Ada

Result

Add b
first
Add b
first

Exercise

Search messages.

git log --="fix"

Quiz Test

What does -- path do?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.