示例:忽略build下面的所有目录,只放开build/ast2500-default/workspace/recipes-phosphor/ 目录
.gitignore 实现文件代码
# 忽略 build 目录下的所有目录
# 并放开build/ast2500-default/workspace/recipes-phosphor/
build/*
!build/ast2500-defaultbuild/ast2500-default/*
!build/ast2500-default/workspacebuild/ast2500-default/workspace/*
!build/ast2500-default/workspace/recipes-phosphor/