我在 Rails 应用程序中收到了很多未跟踪/修改的文件,如下所示:
db/sphinx/development/user_core.spa
db/sphinx/development/user_core.spd
db/sphinx/development/book_core.sph
db/sphinx/development/book_core.spi
db/sphinx/development/book_core.spp
db/sphinx/development/book_core.sps
等等
我应该在提交并推送到 git 时包含这些内容,还是应该将 db/sphinx/development/* 放入我的 .gitignore 文件中?
--在得到下面的答案后编辑--
我最终将其添加到我的 .gitignore 文件中...
# Ignore certain Sphinx files
/db/sphinx/*
/config/*.sphinx.conf
...然后执行此处推荐的操作:Ignore files that have already been committed to a Git repository
最佳答案
您应该将它们添加到 .gitignore。它们类似于数据库文件。我认为您可能想要 checkin 的唯一 sphinx 特定文件是 config/sphinx.yml 文件,假设它不包含任何敏感信息。
关于ruby-on-rails - 用 Rails 思考 Sphinx : should I include these files in my git push?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11963589/