gitignore为eclipse项目的文件夹 [英] gitignore for folder of eclipse projects
问题描述
如果你想拥有所有的Eclipse项目数据在您的机器上,您必须将以下文件/文件夹添加到Git中:
- .classpath
- .project
- .settings(folder)
确保这些不被忽略在您的本地或全球范围 .gitignore
文件。
忽略像 bin
和目标
文件夹,因为它们包含编译的类,不应该添加到Git。
I am working following a set of java swing tutorials, each is an Eclipse project, keep them in a workspace. I init a git repository in the workspace folder (mac), and upload to github. When I download this folder in another computer (linux), the projects are not recognized as such, and opening/importing in Eclipse fails. Says: 'Folder not recognized as project'. What is the best way to handle a collection of projects in git?
If you want to have all of your Eclipse project data across your machines, you will have to add the following files/folders to Git:
- .classpath
- .project
- .settings (folder)
Make sure that these are not ignored in either your local or globale .gitignore
files.
Ignore things like the bin
and target
folders, since they contain the compiled classes and shouldn't be added to Git.
这篇关于gitignore为eclipse项目的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!