How to git ignore subfolders / subdirectories?

后端 未结 10 1186
孤街浪徒
孤街浪徒 2020-11-28 00:30

I have a lot of projects in my .Net solution. I would like to exclude all \"bin/Debug\" and \"bin/Release\" folders (and their contents), but still include the \"bin\" folde

10条回答
  •  伪装坚强ぢ
    2020-11-28 00:45

    Have you tried wildcards?

    Solution/*/bin/Debug
    Solution/*/bin/Release
    

    With version 1.8.2 of git, you can also use the ** wildcard to match any level of subdirectories:

    **/bin/Debug/
    **/bin/Release/
    

提交回复
热议问题