The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Practical Git: Filter commit history with git log arguments

Practical Git: Filter commit history with git log arguments

6:49
In the last lesson, we learned how to _format_ the git log output; in this lesson we will learn how to _filter_ down to a specific set of commits. By default, `git log` shows every commit in a repo. We will walk through using a bunch of options to filter our git log commits to a more meaningful set (`-n`, `--after`, `--before`, `--author`, `--grep`, `-S`, `-G`, `--no-merges`, `{ref}..{ref}`, `{files}`). We will also show how all of the formatting and filtering options can be composed together to query exactly what you are looking for in your commit history.
Watch this lesson now
Avatar
egghead.io

In the last lesson, we learned how to format the git log output; in this lesson we will learn how to filter down to a specific set of commits. By default, git log shows every commit in a repo. We will walk through using a bunch of options to filter our git log commits to a more meaningful set (-n, --after, --before, --author, --grep, -S, -G, --no-merges, {ref}..{ref}, {files}). We will also show how all of the formatting and filtering options can be composed together to query exactly what you are looking for in your commit history.

Avatar
Chester

That was fantastic. Very useful git log arguments. You can start to get an understanding how programs like SourceTree and WebStorm build their integration leveraging all these commands.

Avatar
Trevor

Thanks Chester!

In reply to Chester
Avatar
PHILIPPE

Didn't know about git log --graph ! Killer feature! Thank you.

Avatar
Trevor

Sweet - always like learning those little tips. Thanks for watching.

In reply to PHILIPPE
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?