Git忽略子文件夹 [英] Git ignore sub folders
问题描述
.gitignore和bin /忽略调试和发布文件夹,但也包含bin文件夹中包含的任何dll文件。
bin / Debug或bin / Release不会排除这些目录,除非我将忽略模式完全限定为Solution / Project / bin / Debug - 我不想这样做,因为我需要在我的解决方案中包含每个项目的完整模式,以及添加任何新项目添加它。
有什么建议?
<您尝试过通配符吗?
解决方案/ * / bin / Debug
解决方案/ * / bin / Release
您还可以使用 **
通配符匹配任何级别的子目录:
** / bin中/调试/
** / bin / Release /
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" folder itself and any dll's contained therein.
.gitignore with "bin/" ignores "Debug" and "Release" folders, but also any dll's contained in the "bin" folder.
"bin/Debug" or "bin/Release" in the .gitignore file does not exclude the directories, unless I fully qualify the ignore pattern as "Solution/Project/bin/Debug" - which I don't want to do as I will need to include this full pattern for each project in my solution, as well as add it for any new projects added.
Any suggestions?
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/
这篇关于Git忽略子文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!