简体   繁体   中英

Version control in Java Project?

If I create a new Java project through Netbeans, it has this structure:

  • build
  • dist
  • src
  • build.xml
  • manifest.mf

My question is, do I need to put build and dist under version control? Or will just putting src, build.xml, and manifest.mf be sufficient?

just src, build.xml and manifest.mf should be enough. The dist and build should be built by whatever you are using to build. (maven, NetBean etc)

If you commit the dist and build then you are duplicating your code. The src, build.xml and manifest.mf detail the human readable parts of the project. The build and dis are the machine converted parts of it.

通常,构建工件不受版本控制,而是添加到svn:ignore或p4:ignore或cvs:ignore列表中,这样它们就不会出现在任何同步过程中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM