How to filter git diff based on file extensions?

后端 未结 10 1197
终归单人心
终归单人心 2020-12-02 05:43

Is there an option to restrict git diff to a given set of file extensions?

10条回答
  •  -上瘾入骨i
    2020-12-02 06:15

    git diff will only show differences in unstaged files.

    I found this question because I wanted to exclude .info files from git diff. I achieved this by staging it with git add *.info, which reduces the files left.

提交回复
热议问题