我的代码结构是:
.gitignore
my-service << this is a file without an extention
charts
| my-service << this is a folder
| | file1
| | file2
Run Code Online (Sandbox Code Playgroud)
当我在我的gitignore中写道时,my-service它忽略了my-service文件和my-service文件夹.如何只忽略根目录中的文件,而不是子目录?