如何克隆git repo的归档分支?

时间:2014-11-18 18:17:18

标签: git github

如何克隆git repo的归档分支?

我试过了 git clone https://github.com/debianmaster/simpleCart/tree/8516bac84fda7c47e1ae2ff11083e5ef0681359a

但它不起作用。

我正在尝试克隆此回购的存档分支 https://github.com/debianmaster/simpleCart.git

1 个答案:

答案 0 :(得分:1)

  1. 首先,克隆存储库:

    git clone https://github.com/debianmaster/simpleCart.git
    cd simpleCart
    
  2. 然后,将您的本地master移至8516bac

    git checkout master
    git reset --hard 8516bac
    

  3. foo创建并切换到新分支8516bac

    git checkout -b foo 8516bac