This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 199443

Summary: plugin automatically adds nbproject/private to local .gitignore
Product: versioncontrol Reporter: bfenton
Component: GitAssignee: Ondrej Vrabec <ovrabec>
Status: RESOLVED FIXED    
Severity: normal CC: git
Priority: P3    
Version: 7.0.1   
Hardware: Macintosh (x86)   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: Example .gitignore file

Description bfenton 2011-06-15 19:10:37 UTC
Whenever NetBeans becomes aware of a git project, it automatically adds an entry to the local .gitignore file for the nbproject/private folder. This is (an admittedly minor) annoyance as nbproject already exists in my global .gitignore file. Is there a way the plugin could verify that this addition is necessary before performing it? Here's a SO thread with some ideas on how to check that:

http://stackoverflow.com/questions/466764/show-ignored-files-in-git

Thanks for the plugin
Comment 1 Ondrej Vrabec 2011-06-15 21:51:41 UTC
Please attach the copy of your global ignore file.
Comment 2 bfenton 2011-06-15 22:00:37 UTC
Created attachment 108918 [details]
Example .gitignore file

I tried setting up a new project with just nbproject and also with nbproject/private added, in both cases it still modifies the project's local .gitignore
Comment 3 Ondrej Vrabec 2011-06-15 22:20:50 UTC
(In reply to comment #2)
> Created an attachment (id=108918) [details]
> Example .gitignore file
Where is the file located and what is the excat path to the file? Is it really named .gitignore?
Comment 4 bfenton 2011-06-15 22:28:19 UTC
In my case it's located at ~/.gitignore, although you can specify any file as your global git ignore file with a line like this:

git config --global core.excludesfile ~/.gitignore

Just set it to whatever file name/location you like and git will honor it.
Comment 5 Ondrej Vrabec 2011-06-15 22:30:41 UTC
In the meantime (until it's fixed), just disable the option in Tools -> Options -> Misc -> Versioning -> Git (Automatically ignore non-sharable files)
Comment 6 bfenton 2011-06-15 22:35:14 UTC
I'll try that, thanks. For any OS X users the preference is called "Permanenly ignore not-sharable folders", typo faithfully reproduced.
Comment 7 Ondrej Vrabec 2011-06-16 10:28:06 UTC
fix: http://hg.netbeans.org/core-main/rev/62fd115294b8
Comment 8 Ondrej Vrabec 2011-06-16 10:31:24 UTC
7.0.1 fix: http://hg.netbeans.org/releases/rev/073508252d03
Comment 9 Quality Engineering 2011-06-17 04:52:36 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/073508252d03
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #199443 - plugin automatically adds nbproject/private to local .gitignore
Comment 10 Quality Engineering 2011-06-17 14:40:58 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/62fd115294b8
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #199443 - plugin automatically adds nbproject/private to local .gitignore