How to show a commit’s patch pertaining to a specific path? When viewing the patch of a certain commit with git show <commit> you’re only interested in a certain part of it, related to a file or a directory.