What do I need to add apart from the obvious (src, dist) to my version control system from a NetBeans Java project directory? Can I drop the entire build directory? Should I add the nbproject directory as I’m working on the same project on a different machine as well?
I would like to drop at least the build directory because anytime the application doesn’t compile I get problems with git as there’s a ton of files missing which git considers as being removed.
Note: this answer applies to NB 6.8 (which is what I am using right now) and probably also applies to most of the 6.x versions that are likely to be out there in the wild.
The short answer: Use the ‘Import into Repository’ menu item to do the initial check in. The IDE will check in the stuff that it thinks is necessary.
It is a bit hard to find. Select your project in the Project explorer. Open the Team menu from the menu bar. Once you click it, you will see something like:
The Import into item is a sub item of CVS/Mergcurial/Subversion.
If you you are committed to doing the check-in ‘by-hand’ here is a list of the stuff the IDE usually pushed into a repository:
folders)
and folders)
files and folders — EXCEPT the
‘private’ folder and its content)