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")
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
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?
Also, when I just did "git rm -r --cached .recommenders" it deleted whole bunch of cached files but top level directory stays.
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
.recommenders/
nothing added to commit but untracked files present (use "git add" to track)
If I try to remove it then it completely resets Eclipse workspace, and I have to import all projects all over again (so it doesn't physically delete workspace".
Open one of your files, make a change, and you should see it appear in the Git Staging view in the Unstaged Changes window. Drag it into the Staged Changes area, add a commit message, and click Commit. You can also use the Team menu; right-click on the file, choose Team -> Add to Index, then Commit.
Use Ctrl+3 (or Cmd+3) and type Git Repositories in the dialog to open the Git repositories view. This view shows you the Git repositories you can work with in Eclipse and allows you to add existing repositories to Eclipse, create or clone repositories. It also allows you to perform Git operations.
In Package Explorer, right-click your project and Select Team, Push Branch ... . Paste the clone URL from the clipboard into the URI field and select Next. Make sure Configure upstream for push and pull is selected in the next window and select Next. Review the changes and select Finish in the Push Branch window.
Right-click your project and select Team → Branch to create new branches or to switch between existing branches. You can also switch branches in the History view.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With