【问题标题】:Restore Gemfile.lock from gitignore从 gitignore 恢复 Gemfile.lock
【发布时间】:2013-04-20 10:19:51
【问题描述】:

在我的 Rails 应用程序中,Gemfile.lock 在通过 .gitignore 的跟踪中被忽略

但我希望提交和跟踪文件。

我该怎么做?

【问题讨论】:

  • 从 .gitignore 中删除它?
  • 是的,如果我从 .gitignore 文件中删除 Gemfile.lock,它会显示 .gitignore 已修改,但我在修改后的列表中看不到 Gemfile.lock。

标签: ruby-on-rails ruby git gemfile


【解决方案1】:

首先从 .gitignore 中删除 Gemfile.lock 的条目,添加 .gitignore 并提交。然后添加并提交 Gemfile.lock。只要这些在两个单独的提交中完成,其他团队成员也将能够跟踪 Gemfile.lock 文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-12-25
    • 2011-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-07
    • 2013-06-05
    相关资源
    最近更新 更多