我通常使用以下命令在colab中克隆github repo:
!git clone https://github.com/user/repo.git
但是,如果我想要克隆repo的特定分支,我尝试了下面的命令:
!git clone https://github.com/user/repo/tree/branch.git
但是我遇到了错误:
fatal: repository 'https://github.com/user/repo/tree/branch.git/' 未找到。
我通常使用以下命令在colab中克隆github repo:
!git clone https://github.com/user/repo.git
但是,如果我想要克隆repo的特定分支,我尝试了下面的命令:
!git clone https://github.com/user/repo/tree/branch.git
但是我遇到了错误:
fatal: repository 'https://github.com/user/repo/tree/branch.git/' 未找到。
试试这个:
!git clone -b branch_name https://github.com/user/repo.git
用要克隆的分支名称替换 branch_name