--- title: "filtered git diff" date: 2021-06-25T10:49:51+02:00 draft: false snippet_types: - git --- How to browse git diff of two hashes but exclude some files. In this case any file with test in the name won't be in the diff. ```shell gd xxxsha001xxx...xxxsha002xxx -- $(gd --name-only xxxsha001xxx...xxxsha002xxx | rg --invert-match test) ``` "gd" == "git diff", via zsh git plugin [source](https://www.yaplex.com/blog/find-list-of-files-which-are-different-between-two-branches-in-git)