【问题标题】:Make changes to git forked repo and get the updated code through git URL更改 git forked repo 并通过 git URL 获取更新后的代码
【发布时间】:2012-08-24 19:00:31
【问题描述】:

我已经从 Github 分叉了 resque repo,并对标签 v1.20.0 进行了一些更改。然后我想使用 Gem 文件中的 git URL 从 Github 获取更改后的代码。

gem 'resque', :git => "git://github.com/forked_repo/resque.git", :tag => "v1.20.0"

实际上,当我进行更改时,在分叉的 repo 中创建了一个带有 tag_name 的分支。所以,我也在 Gem 文件中尝试了以下行。

gem 'resque', :git => "git://github.com/forked_repo/resque.git", :branch => "v1.20.0"

但是,我没有得到我已更改的新更改(进入捆绑程序)。我无需更改即可获得 v1.20.0 的 repo 代码。

我已经登录到 Github 并在那里编辑了更改。

请在这里提出解决方案...

【问题讨论】:

    标签: ruby-on-rails github resque gemfile


    【解决方案1】:

    您可以将它指向具有您最近更改的特定提交:

    gem 'resque', :git => "git://github.com/forked_repo/resque.git", :ref => "abcdef"
    

    请确保您事后发送bundle update resque

    【讨论】:

    • 感谢@ctide 的回答。抱歉,忘记在问题中提及这一点。我也尝试过这个选项。 Ran bundle update resque too ...但是,没有运气。我仍然在我的捆绑器 gems 文件夹中获取旧代码
    • 创建分支时出现问题。我忽略了这一点。我再次分叉并尝试了@ctide 建议的步骤。它正在工作。谢谢。
    猜你喜欢
    • 1970-01-01
    • 2012-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-18
    • 1970-01-01
    相关资源
    最近更新 更多