0

I've been using NetBeans for the last couple of years and only recently upgraded to 8.0.2. It seems that the new project file tracks which files are open in the project workspace (C++) and thus the project file appears as modified whenever I open Netbeans, although I haven't changed anything. Is there a setting to disable this?

3
  • Which file are you seeing as modified? Are you using git from the command-line or the menus built-in to Netbeans? Commented Aug 4, 2015 at 12:33
  • @WillShackleford The modified file is private.xml in nbproject folder. I guess the whole private folder should be out of GIT. I am using the NetBeans builtin menus.
    – Goran
    Commented Aug 4, 2015 at 18:07
  • I am not sure whether you needed the git instructions. I added it as an answer just in case. For Java projects it seems to automatically ignore the private directory, so that may be a bug. All my old projects already had the private directory in gitignore but the new one I created seems to have the same problem. Commented Aug 4, 2015 at 20:27

1 Answer 1

2

Create a file named ".gitignore" in the top-level directory, if it does not already exist.

Add the line:

nbproject/private/

To do this with Netbeans: Window -> Files, Select the Directory and right-click for Pop-up.
New -> Other ... -> Empty File.
Name the file ".gitignore"

When you do diffs and commits etc. it should ignore the private files that might have changed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.