Yes, if you ensure that git expands a glob rather than your shell then it will match at any level so something like this (quotes are important) should work fine.
git diff -- '*.c' '*.h'
More Related Contents:
- Why do I need to explicitly push a new branch?
- What does “Git push non-fast-forward updates were rejected” mean?
- Git merge left HEAD marks in my files
- Gitignore not working
- Retrieve the commit log for a specific line in a file?
- Updating a local repository with changes from a GitHub repository
- git: fatal: Could not read from remote repository
- How do I make Git forget about a file that was tracked, but is now in .gitignore?
- How do I squash my last N commits together?
- How do I make git use the editor of my choice for editing commit messages?
- How to change the commit author for a single commit?
- Remove file from latest commit
- Git’s famous “ERROR: Permission to .git denied to user”
- Git allows for branch change with unstaged changes
- Remove last commit from remote git repository [duplicate]
- Git checkout: updating paths is incompatible with switching branches
- What’s the significance of the “No newline at end of file” log?
- How can I split up a Git commit buried in history?
- I cannot add the parent directory to *safe.directory* in Git
- ClearCase to Git migration
- Count the number of commits on a Git branch
- Where should I place my global ‘gitattributes’ file?
- How can I get the parents of a merge commit in Git?
- git-clone and post-checkout hook
- How do I move an existing Git submodule within a Git repository?
- Change date of git tag (or GitHub Release based on it)
- How to push new branch without history
- Xcode 9 commit: Couldn’t communicate with helper application
- getting “fatal: not a git repository: ‘.'” when using post-update hook to execute ‘git pull’ on another repo
- Viewing full version tree in git