How to git ignore subfolders / subdirectories?

后端 未结 10 1161
孤街浪徒
孤街浪徒 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 01:08

    You can use .gitignore in the top level to ignore all directories in the project with the same name. For example:

    Debug/
    Release/
    

    This should update immediately so it's visible when you do git status. Ensure that these directories are not already added to git, as that will override the ignores.

提交回复
热议问题