什么是“svn update -r”的git等价物? [英] What's the git equivalent of "svn update -r"?

查看:136
本文介绍了什么是“svn update -r”的git等价物?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是最近的git convert。能够使用git-svn在本地保留我的分支而不干扰svn服务器是非常好的。最新版本的代码中存在一个错误。我想建立一个工作时间,以便我可以使用git bisect。我无法找到正确的命令及时移回。感谢。

I'm a recent git convert. It's great to be able to use git-svn to keep my branches locally without disturbing the svn server. There was a bug that existed in the latest version of the code. I wanted to establish a time when it worked so that I could use git bisect. I couldn't find the right command to move back in time. Thanks.

推荐答案

git checkout HEAD~1

这会将您当前的HEAD移动到更早的版本。

This will move your current HEAD to one revision earlier.

git checkout <sha>

这会将当前的HEAD移动到给定的版本。使用 git log gitk 来查找您要查找的修订。

This will move your current HEAD to the given revision. Use git log or gitk to find the revision you’re looking for.

这篇关于什么是“svn update -r”的git等价物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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