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 269217 - Git push ignoring .gitignore
Summary: Git push ignoring .gitignore
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-02 19:13 UTC by nestoracevedo
Modified: 2016-12-13 18:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (61.46 KB, text/plain)
2016-12-02 19:13 UTC, nestoracevedo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nestoracevedo 2016-12-02 19:13:38 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Linux version 3.16.7-48-desktop running on amd64
Java; VM; Vendor = 1.8.0_92
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.92-b14

Reproducibility: Happens sometimes, but not always

STEPS:
  * Right click on project, Git->add
  * Right click on project, Git->commit and add message. On list I don't see ignored files via .gitignore
  * Right click on project, Git->remote->push to upstream

ACTUAL:
  sometimes ignored files via .gitignore are already ignored, sometimes not

EXPECTED:
  files ignored via .gitignore should not be pushed on commit
Comment 1 nestoracevedo 2016-12-02 19:13:42 UTC
Created attachment 163134 [details]
IDE log
Comment 2 Ondrej Vrabec 2016-12-05 16:03:16 UTC
Are you saying that even though the files are ignored by .gitignore, they are committed into the repo when you do Git->Commit? What is the pattern inside .gitignore? And what is the file's path?
Comment 3 nestoracevedo 2016-12-13 18:27:06 UTC
(In reply to Ondrej Vrabec from comment #2)
> Are you saying that even though the files are ignored by .gitignore, they
> are committed into the repo when you do Git->Commit? What is the pattern
> inside .gitignore? And what is the file's path?

Yes, I had to put a new .gitignore inside the directory where files to be ignored resides currently to ignore them.

Files full path are: 
/home/my-directory/public_html/app/config/app.php
/home/my-directory/public_html/app/config/session.php
/home/my-directory/public_html/app/config/cache.php

So in the .gitignore file on root project I had:
app/config/app.php
app/config/session.php
app/config/cache.php

Doing a git via konsole these files are correctly ignored but Netbeans tracks constantly the files on git add - git commit on IDE, then when they are listed on commit dialog I had to uncheck these files for ignoring.