Cloning Multiple Branches in GitHub for Windows

前端 未结 1 585
再見小時候
再見小時候 2021-02-05 17:31

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

1条回答
  •  隐瞒了意图╮
    2021-02-05 17:46

    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.

    1. Clone the two branches from the Git Shell

      git clone https://your-project/master/ master

      git clone https://your-project/gh-pages/ gh-pages

    2. In Git for Windows, drag & drop the folder you want to work on.

    3. To switch branch, drag & drop the folder for the other branch.

    0 讨论(0)
提交回复
热议问题