Want to exclude file from “git diff”

后端 未结 13 1982
梦谈多话
梦谈多话 2020-12-07 07:27

I am trying to exclude a file (db/irrelevant.php) from a Git diff. I have tried putting a file in the db subdirectory called .gitattributes

13条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 07:43

    This method is shorter than the accepted answers.

    git diff 987200fbfb 878cee40ba --stat -- ':!*.cs'
    

    For more information about the different inclusion/exclusion possibilities read this other post

提交回复
热议问题