在GitHub for Windows中克隆多个分支 [英] Cloning Multiple Branches in GitHub for Windows
问题描述
我有时需要在本地磁盘上同时安装两个不同的GitHub仓库分支。 (特别是在处理gh页面时)
我通常通过在不同文件夹中制作多个repo克隆来实现这一点,克隆使用不同的分支。
是否可以在GitHub for Windows UI中执行此操作? (而不是将单个本地克隆从一个分支切换到另一个分支)
看起来,在本地克隆之间切换的唯一方式是每次将新克隆拖入UI。
我不认为用当前版本(1.0.9.2)做你想做的事情是可能的,但这是我所做的在两个分支上工作。
-
克隆来自Git Shell的两个分支
git clone https:// your-project / master / master
git clone https:// your-project / gh-pages / gh-pages
-
在Git for Windows中, ;放下您想要处理的文件夹。
- 要切换分支,请将&删除其他分支的文件夹。
I sometimes need to have two different branches of a GitHub repo on my local disk at the same time. (especially when dealing with gh-pages)
I usually do this by making multiple clones of the repo in different folder, with clone using a different branch.
Is it possible to do this in the GitHub for Windows UI? (as opposed to switching a single local clone from one branch to another)
It looks like the only way to switch between local clones is to drag the new clone into the UI every time.
I don't think it is possible to do what you want to do with the current version (1.0.9.2) but here is what I do to work on two branches.
Clone the two branches from the Git Shell
git clone https://your-project/master/ master
git clone https://your-project/gh-pages/ gh-pages
In Git for Windows, drag & drop the folder you want to work on.
- To switch branch, drag & drop the folder for the other branch.
这篇关于在GitHub for Windows中克隆多个分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!