如何去eclipse和egit的以前的提交 [英] How to go to previous commits in eclipse and egit

查看:88
本文介绍了如何去eclipse和egit的以前的提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在eclipse中管理的git android项目,有时我想暂时将我的Android项目回滚到一个特定的时间,然后构建它,然后再恢复到最新版本。
这是可能的吗?

解决方案

查看旧状态:


  1. 打开存储库的历史视图

  2. 在您想要的时候选择提交

  3. 上下文菜单> 结帐

当您想回去时,只需选择主人的提交(或您之前工作的分支),然后再次选择结帐。因为在那里有一个分支,它将自动检出分支而不是提交。



请注意,您可能还需要启用显示所有分支和标签在历史记录视图中查看主人的历史记录,请参阅用户指南中的部分


I have a git android project managed in eclipse and some times i want to temporarily roll back my android project to a specific time and then build it and do stuff and then restore to the latest version. How is this possible?

解决方案

To check out an old state:

  1. Open the History view for the repository
  2. Select the commit at the time you want
  3. Context menu > Checkout

When you want to go back, just select the commit where master is (or the branch you were working on before) and select Checkout again. Because there is a branch there, it will automatically check out the branch instead of the commit.

Note that you may also have to enable "Show All Branches and Tags" in the history to see master in the history view, see the section in the user guide about this.

这篇关于如何去eclipse和egit的以前的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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