正在将整个 git 存储库下载到 google colab
Downloading an entire git repo to google colab
github 上有一个存储库,其中包含图像数据集。我想在我的 google colab 上下载整个存储库。但它似乎没有用。
这是我试过的
from google.colab import drive
drive.mount('/content/drive')
# kaggle is the folder that I created on my drive
!cd "drive/My Drive/kaggle"
# Downloading the repo on my drive
!git clone https://github.com/ardamavi/Sign-Language-Digits-Dataset.git
但是我收到一个错误
Cloning into 'Sign-Language-Digits-Dataset'...
fatal: I don't handle protocol '/content/https'
预期结果:
如何将整个存储库下载到我的驱动器或 运行 colab 的 运行 时间存储中。他们中的任何一个都可以。
注意:我尝试了所有可能的答案,作为对这个问题的建议,但 none 对我有用。
尝试 %cd
而不是 !cd
。使用 !
执行的命令在子 shell 中执行,因此如果使用 !
执行 cd
,您实际上不会更改后续 shell 命令的工作目录.
这是一个例子:
github 上有一个存储库,其中包含图像数据集。我想在我的 google colab 上下载整个存储库。但它似乎没有用。 这是我试过的
from google.colab import drive
drive.mount('/content/drive')
# kaggle is the folder that I created on my drive
!cd "drive/My Drive/kaggle"
# Downloading the repo on my drive
!git clone https://github.com/ardamavi/Sign-Language-Digits-Dataset.git
但是我收到一个错误
Cloning into 'Sign-Language-Digits-Dataset'...
fatal: I don't handle protocol '/content/https'
预期结果:
如何将整个存储库下载到我的驱动器或 运行 colab 的 运行 时间存储中。他们中的任何一个都可以。
注意:我尝试了所有可能的答案,作为对这个问题的建议,但 none 对我有用。
尝试 %cd
而不是 !cd
。使用 !
执行的命令在子 shell 中执行,因此如果使用 !
执行 cd
,您实际上不会更改后续 shell 命令的工作目录.
这是一个例子: