Avatar of KPax
KPax

asked on 

Git java eclipse stop tracking .recommenders

I haven't had this problem before Eclipse Luna (I updated from Kepler just few days ago).
Although I added to .recommenders to .gitignore it keeps tracking it.

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   .recommenders/caches/identified-project-coordinates.json
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_3.fdt
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_3.fdx
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_3.fnm
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_3.frq
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_3.nrm
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_3.prx
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_3.tii
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_3.tis
        modified:   .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/segments.gen
        deleted:    .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/segments_4
        modified:   .recommenders/repository/http___download_eclipse_org_recommenders_models_luna_/org/ecli
.properties

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_5.fdt
        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_5.fdx
        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_5.fnm
        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_5.frq
        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_5.nrm
        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_5.prx
        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_5.tii
        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/_5.tis
        .recommenders/index/http___download_eclipse_org_recommenders_models_luna_/segments_6

no changes added to commit (use "git add" and/or "git commit -a")

Open in new window


Here is my .gitignore file:

*target*
*.jar
*.war
*.ear
*.class

# eclipse specific git ignore
*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
.recommenders/

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

Open in new window


If I do git rm -rf --cached it removes it, but soon starts tracking again - as soon as my colleague makes changes in his files and push it on Bitbucket and I do pull.
How should I fix this problem permanently?
Editors IDEsVersion ControlJava

Avatar of undefined
Last Comment
KPax
Avatar of mccarl
mccarl
Flag of Australia image

Sounds like the files are already committed and pushed to BitBucket, .gitignore won't help you with that. Try this...

- First, save a copy of those .recommenders files if you need to keep them.
- Pull the latest from BitBucket.
- Remove the entry for .recommenders from .gitignore
- Delete the entire .recommenders folder
- Stage, commit & push those deletions to BitBucket.
- Now add the entry in .gitignore back in.
- Also, go to your colleagues PC and pull the same changes down. Ensure that there is no .recommenders folder on their machine and then double check that their .gitignore has the entry and is spelt correctly.

Hopefully, you should be right now!
ASKER CERTIFIED SOLUTION
Avatar of KPax
KPax

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of KPax
KPax

ASKER

It is 100% correct solution for question I asked.
Java
Java

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo