Adam Johnson
Read post

Git: exclude commits by an author in git log with --perl-regexp

git log supports an --author flag to filter commits by author, but lacks a built-in way to exclude authors. Using --perl-regexp, you can embed a negative lookahead regex (^((?!<pattern>).)*$) into the --author option to show all commits except those from a matching author. A practical example demonstrates filtering out Dependabot bot commits when browsing GitHub Actions workflow history. Note that --perl-regexp requires Git to be compiled with PCRE support.

    #git
Yesterday•3m read time•From adamj.eu
Post cover image
Table of contents
Example: hide the botsFin
103 Impressions
Adam Johnson's image
Adam Johnson

AdamJ's platform covers topics related to software development, technology trends, and coding tutor...

54 Followers

•

443 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard