【问题标题】:Unable ignore the eclipse setting in gitignore无法忽略 gitignore 中的 eclipse 设置
【发布时间】:2016-09-11 18:49:09
【问题描述】:
I am using 

/*/.settings/*


/*/.settings/

忽略eclipse设置。

abc.host.client/.settings/org.eclipse.jdt.core.prefs

but unable to ignore the following files.

abc.host.client/.settings/org.eclipse.wst.common.project.facet.core.xml

abc.host.client/.settings/org.eclipse.wst.common.component

我使用的是 git 版本 1.7.1。我可以知道是什么问题吗?谢谢。

【问题讨论】:

  • 你是什么时候把这个添加到.gitignore的?
  • ..dt.core.prefs 已经提交到 Git 服务器。 ..common.project.facet.core.xml & ..common.component 是新修改的。但我已经尝试过 git rm -r --cached 。可惜没用。
  • 在许多情况下,这些设置文件夹最好与您的队友共享并提交。

标签: eclipse git gitignore


【解决方案1】:

由于您最近在.gitignore中添加了/*/.settings/*,所以需要清除.gitignore的缓存。

git rm --cache .gitignore

之后像往常一样提交。

【讨论】:

  • /*/.settings/* 已添加到 .gitignore 并上次提交到 Git 服务器。但不知道为什么它无法忽略这两个文件。
  • @user1238353:你试过git rm --cache .gitignore,然后git push origin master --force
  • 是的。我试过 git rm --cache .gitignore。但这将删除我的 .gitignore。 git push origin master --force 会将文件推送到服务器?
猜你喜欢
  • 2016-05-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-11-12
  • 2012-07-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多