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 243498 - Gitignore options are not taken into account
Summary: Gitignore options are not taken into account
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.0
Hardware: PC Linux
: P4 normal with 3 votes (vote)
Assignee: Ondrej Vrabec
Depends on:
Reported: 2014-04-02 23:11 UTC by alumni
Modified: 2014-06-11 15:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description alumni 2014-04-02 23:11:15 UTC
The following lines from my .gitignore file are not taken into account:

# IDE settings
# Compiled/optimized scripts

Netbeans automatically adds these files to version control, despite my settings. The command line git client ignores them (expected behaviour)

Product Version = NetBeans IDE 8.0 (Build nbms-and-javadoc-1507-on-20140402)
Operating System = Linux version 3.13.7-1-ARCH running on amd64
Java; VM; Vendor = 1.8.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Comment 1 Ondrej Vrabec 2014-04-03 06:28:32 UTC
I understand double '*', but what about {,}? JGit simply does not support everything from glob patterns, it merely tries to keep track with what is stated in git help ignore. See also bug #242551 for double asterisks pattern.
The only advise i can give you is not to use {,}.
Comment 2 alumni 2014-04-09 15:15:06 UTC
I was using glob patterns before with the commandline git client, so when I switched the project to Netbeans, I was expecting it to support them too...

Anyway, here's some other pattern that doesn't work for me (might be related to the ** issue):

The file I need to ignore is /project/app/settings/

The following patterns won't work:

    settings/ (works with regular git)

But the following will:

Comment 3 alumni 2014-04-09 16:03:49 UTC
my bad, "settings/" doesn't work with regular git, but "**/settings/" does.
Comment 4 rptmaestro 2014-05-20 17:05:18 UTC
I have a similar issues. Here are my settings:

# Ignore build folders

# Ignore Netbeans Maven extensions

From the command-line, I run:

git add --all
git status

The output correctly ignores these files.


However, when I run "Git > Show Changes", NetBeans displays both of these files with the status of "-/Added".

Moreover, many times after working on int my repository, Netbeans will insert entries for every target folder in my Maven project hierarchy. For example:

Comment 5 reinouts 2014-06-11 15:46:38 UTC
Possible duplicate of issue #242551 as well?
Comment 6 Ondrej Vrabec 2014-06-11 15:51:12 UTC
(In reply to reinouts from comment #5)
> Possible duplicate of issue #242551 as well?
This one covers also {} patterns and the full fnmatch syntax which i think will not be fixed in JGit any time soon. On the other hand ** might come sooner so better to keep the issues separated