哪些 NetBeans 项目文件应该进入源代码管理? [英] Which NetBeans projects files should go into source control?

查看:29
本文介绍了哪些 NetBeans 项目文件应该进入源代码管理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们通常将 Eclipse 用于特定的 Java 项目,但最近我将该项目导入 NetBeans 以使用其对话框构建功能.

We normally use Eclipse for a particular Java project, but recently I imported the project into NetBeans to use its dialog building features.

因为我可能会回到这个话题,所以我想将 NetBeans 项目文件存储到版本控制中.但是,我不想提交我的"与项目"的文件,即我自己的设置会与其他用户的设置冲突的文件.

Since I'll probably come back to this, I wanted to store the NetBeans project files into version control. However, I don't want to commit files that are "mine" versus "project", i.e., files with my own settings that would conflict with another user's.

NetBeans 在顶级项目区域中创建了以下结构:

NetBeans created the following structure in the top-level project area:

nbbuild
nb-build.xml
nbproject
    <various files>
    configs
    private

显然 nbbuild 是构建输出,因此不会进入.nb-build.xml 文件似乎很可能,大部分 nbproject.但是,nbproject/private 表明它是我的".偷看配置",我不清楚这是我的还是项目...

Clearly nbbuild is build output, so that won't go in. The nb-build.xml file seems likely, as does most of nbproject. However, nbproject/private suggests it's "mine". Peeking at "configs", it's not clear to me if that's mine or project...

有人有一些指导方针吗?

Anyone have some guidelines?

推荐答案

关于项目文件的 NetBeans 知识库文章 &版本控制讨论了 NetBeans 项目文件,对于哪些文件是项目特定的(即可以通过版本控制共享)以及哪些是用户特定的,给出了松散的建议.

The NetBeans knowledge base article on project files & version control discusses the NetBeans project files, with loose advice about which files are project specific (i.e. can be shared via version control), and which are user specific.

这是关于版本控制的部分:

Here is the section on version control:

如果项目从版本控制系统中检出,build(或 nbbuild)、dist(或 nbdist),nbproject/private 文件夹不应被检入该版本控制系统.

If the project is checked out of a version control system, the build (or nbbuild), dist (or nbdist), and the nbproject/private folders should not be checked into that version control system.

如果项目在 CVS、Subversion 或 Mercurial 版本控制系统下,则适当的忽略"导入项目时,会为这些目录创建或更新文件.

If the project is under the CVS, Subversion, or Mercurial version control systems, the appropriate "ignore" files are created or updated for these directories when the project is imported.

尽管 nbproject/private 应该被忽略,nbproject 应该被检入版本控制系统.nbproject 包含项目元数据,使其他用户无需先导入项目即可在 NetBeans 中打开项目.

Though nbproject/private should be ignored, nbproject should be checked into the version control system. nbproject contains project metadata that enables other users to open the project in NetBeans without having to import the project first.

这篇关于哪些 NetBeans 项目文件应该进入源代码管理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆