.gitignore和Visual Studio项目:忽略bin/Debug目录,而不是bin/Release目录 [英] .gitignore and Visual Studio project: Ignore bin/Debug directory but not bin/Release directory

查看:555
本文介绍了.gitignore和Visual Studio项目:忽略bin/Debug目录,而不是bin/Release目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆