git 无法使用 .gitignore 排除文件夹
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12077206/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 07:23:43 来源:igfitidea点击:
Can't exclude a folder using .gitignore
提问by Eugene
I can't exclude files from .idea
folder from tracking by git. It is on the same level as .gitignore
file and my .gitignore
contains:
我无法.idea
从 git 跟踪的文件夹中排除文件。它与.gitignore
文件处于同一级别,我的.gitignore
包含:
.idea
and even:
乃至:
idea
Any advice guys?
有什么建议吗?
回答by Blake Taylor
Append a slash to exclude directories.
添加斜杠以排除目录。
.idea/