commit limiting
git log options that keep only the commits you ask about, by count, date, author or words in the message.
In more detail
-n 3 or -3 shows three commits; --since and --until take dates; --author matches the author name; --grep matches the message and can be given more than once. They combine, so you can start wide and narrow down.
Examples
git log --oneline --since=2024-03-05 --until=2024-03-06git log --oneline --grep '^feat' --grep '^fix'Related terms
- git log — The Git command that lists commits with their identifiers, authors, times and messages.
- pickaxe — A git log search, -S followed by a string, that finds commits which changed how many times that string appears in the code.
- regular expression — A pattern language for matching text, where characters such as ., *, ^ and $ have special meanings.
Taught in
- Conventional Commits — Advanced Git Internals & Distributed Workflows
- Reading History: log, show And diff — Advanced Git Internals & Distributed Workflows