你如何回滚到以前的Gemfile.Lock? [英] How do you rollback to a previous Gemfile.Lock?

查看:205
本文介绍了你如何回滚到以前的Gemfile.Lock?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近运行了捆绑更新,并将Twitter-bootstrap-rails gem更新为最新版本。从那时起,标题大小发生了变化,我想回滚到以前的所有宝石版本。



我试着回滚到我以前的gemfile和包更新,但问题是我没有在我的gemfile中指定版本,所以不知道是否会降级版本。我也尝试过检查以前的特定版本并指定,但我认为所有的依赖关系也都发生了变化。



所以我需要找到一种方法回到使用所有旧版本,似乎存储在Gemfile.lock文件中。我会如何做到这一点?

解决方案

您可以轻松地回到您在git中跟踪的任何文件的版本中, p>

  git checkout< some-ref> -  path / to / your / file 

其中some-ref是

  HEAD ^ 
HEAD〜5
v1.2
有些分支

etc

I recently ran 'bundle update,' and it updated the Twitter-bootstrap-rails gem to the latest version. Ever since then, the header size has changed, and I would like to roll back to the previous gem versions for all my gems.

I tried rolling back to my previous gemfile and bundle updating, but the problem was I didn't specify versions in my gemfile so it doesn't know to degrade a version. I also tried checking the specific previous version and specifying that, but I think all the dependencies changed as well.

So I need to find a way to just go back to using all the old versions, which seems to be stored in the Gemfile.lock file. How would I do this?

解决方案

you can easily go back to a version of any file that you track in git with

git checkout <some-ref> -- path/to/your/file

where some-ref is

HEAD^
HEAD~5
v1.2
some-branch

etc

这篇关于你如何回滚到以前的Gemfile.Lock?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆