什么是“svn update -r”的git等价物? [英] What's the git equivalent of "svn update -r"?
问题描述
我是最近的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屋!