What's the git equivalent of “svn update -r”?

守給你的承諾、 提交于 2019-12-02 19:56:08
git checkout HEAD~1

This will move your current HEAD to one revision earlier.

git checkout <sha>

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

And getting back to latest (equivalent to: svn up), you'll need to update the branch, usually:

git checkout master

This is because the HEAD refers to the version that is being checked out.

git pull 

seems a more appropriate command for what you are looking for

This seems to do what I wanted, which is what I think you're asking for too

git checkout *

If you are using TortoiseGit then

Right Click in project folder > TortoiseGit > Pull
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!