简体   繁体   English

TortoiseGit:如何还原/撤消&#39;git checkout <SPECIFIC BRANCH>

[英]TortoiseGit: How to revert/undo 'git checkout <SPECIFIC BRANCH>

I know how to checkout a specific branch from here , but after having done so (checkout on same branch), I wish to now 'git checkout head' to get back to the latest revision. 我知道如何从此处签出特定分支,但是在这样做之后(在同一分支上签出),我现在希望“ git checkout head”回到最新版本。

One way is to git pull from remote and merge that way, but is there a way I can do this without depending on remote? 一种方法是从远程进行git pull并以这种方式合并,但是有没有一种方法可以不依赖于远程执行此操作呢?

Please tell me how to do this on TortoiseGit, not command line. 请告诉我如何在TortoiseGit而不是命令行上执行此操作。

  1. TortoiseGit -> Show Log TortoiseGit->显示日志
  2. Right click branch name hyperlink on top left corner 右键单击左上角的分支名称超链接
  3. You have a short history of branches, select master 您的分支机构历史很短,请选择主
  4. Right click the first commit in log list, switch / checkout to master 右键单击日志列表中的第一个提交,切换/检出为主

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM