TortoiseGit克隆远程分支 [英] TortoiseGit clone remote branch

查看:391
本文介绍了TortoiseGit克隆远程分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用Git(长期的Subversion用户)时试图与Git保持一致,但是我找不到用TortoiseGit克隆远程分支的方法.

I am trying to come to terms with Git as I recently started using it (long time Subversion user) and I cannot find a way to clone a remote branch with TortoiseGit.

我创建了一个本地分支,并将其推送到GitHub,但是当我尝试克隆(签出)该远程分支时,找不到任何方法.

I have created a local branch which I pushed to GitHub, but when I try to clone (checkout) this remote branch I cannot find any way to do it.

我该怎么办?

推荐答案

如linquize所述,此功能不是TortoiseGit直接提供的.如果确实要使用它,则可以:

As stated by linquize, this functionality isn't directly provided by TortoiseGit. If you really want to use it though, you can:

  • 克隆分支所属的存储库(右键菜单-> Git Clone ...).这还将把克隆创建的工作副本检出到HEAD

  • 将工作副本从HEAD切换到所需的分支/标签(右键菜单-> TortoiseGit->切换/签出)

这将比从命令行花费更长的时间,因为最初的克隆命令意味着要先结帐,然后必须切换回所需的分支/标签.

This will take a bit longer than from the command line, because the initial clone command implies a checkout to head, which you then have to switch back to the branch/tag you want.

这篇关于TortoiseGit克隆远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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