Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Git java eclipse stop tracking .recommenders

Posted on 2014-12-25
3
Medium Priority
?
466 Views
Last Modified: 2015-01-03
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?
0
Comment
Question by:KPax
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 36

Expert Comment

by:mccarl
ID: 40519305
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!
0
 

Accepted Solution

by:
KPax earned 0 total points
ID: 40519452
As it turned out, on one workstation there was missing

.recommenders/

in .gitignore file on one workstation. Adding that as well as running

git rm -rf --cached

on every workstation solved the problem.
0
 

Author Closing Comment

by:KPax
ID: 40528932
It is 100% correct solution for question I asked.
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question