.gitignore和Visual Studio项目:忽略bin/Debug目录,而不是bin/Release目录 [英] .gitignore and Visual Studio project: Ignore bin/Debug directory but not bin/Release directory
问题描述
我在git存储库中有一个C#Visual Studio项目.我想忽略目录bin/Debug
的内容,而不是目录bin/Release
'的内容.我已经在我的.gitignore
文件中添加了bin/Debug
,但是它似乎不起作用-它包含了bin
目录的全部内容.正确的输入方式是什么?
I have a C# Visual Studio project in a git repository. I want to ignore the contents bin/Debug
directory but not the contents of the bin/Release
' directory. I've added bin/Debug
to my .gitignore
file, but it doesn't seem to work - it is including the entire contents of the bin
directory. What would the correct entry be to do this?
推荐答案
我通过将bin/Debug
替换为Debug
来解决此问题.
I fixed this by replacing bin/Debug
with Debug
.
这也将导致忽略obj/Debug
目录的效果,但是我想忽略obj
目录的全部内容,因此我还向.gitignore
添加了obj
.
This would also have the affect of ignoring the obj/Debug
directory, however I want to ignore the entire contents of the obj
directory, so I have also added obj
to .gitignore
.
这篇关于.gitignore和Visual Studio项目:忽略bin/Debug目录,而不是bin/Release目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!