如何在 Git 中忽略这个 Eclipse 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15948761/
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
How do I ignore this Eclipse file in Git?
提问by Envin
I tried adding it to my global .gitignorebut it is still showing up as an untracked file when I do git status
.
我尝试将它添加到我的全局.gitignore 中,但是当我这样做时它仍然显示为未跟踪的文件git status
。
researchProject/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator (4).launch
I disabled the JavaScript validator because it kept giving my build errors -- the only solution I found was to disable it.
我禁用了 JavaScript 验证器,因为它不断给出我的构建错误——我找到的唯一解决方案是禁用它。
回答by kostja
add the following lines to your .gitignore
file:
将以下行添加到您的.gitignore
文件中:
.project
.settings
.classpath
.metadata
and for your case also
对于你的情况也
.externalToolBuilders
and you should be good to go.
你应该很高兴去。
Do not add .project
and .classpath
to .gitignore
if you are working on an eclipse-specific project.
不要添加.project
,并.classpath
以.gitignore
如果您正在使用的Eclipse的具体项目。