gpt4 book ai didi

java - Git 不会停止跟踪 eclipse java .recommenders

转载 作者:搜寻专家 更新时间:2023-10-31 19:54:41 25 4
gpt4 key购买 nike

我在 Eclipse Luna 之前没有遇到过这个问题(我几天前才从 Kepler 更新)。尽管我将 .recommenders 添加到 .gitignore,但它一直在跟踪它。

$ 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")

这是我的 .gitignore 文件:

*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

如果我执行 git rm -rf --cached 它会删除它,但很快就会再次开始跟踪 - 一旦我的同事更改了他的文件并将其推送到 Bitbucket 上,我就会 pull 。我应该如何永久解决这个问题?

此外,当我刚刚执行“git rm -r --cached .recommenders”时,它删除了一大堆缓存文件,但保留了顶级目录。

$ 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)

如果我尝试删除它,那么它会完全重置 Eclipse 工作区,我必须重新导入所有项目(因此它不会物理删除工作区)。

最佳答案

事实证明,在一个工作站上丢失了

.recommenders/

在一台工作站上的 .gitignore 文件中。添加并运行

git rm -rf --cached

在每个工作站上都​​解决了这个问题。

关于java - Git 不会停止跟踪 eclipse java .recommenders,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27650929/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com