Skip to content

Instantly share code, notes, and snippets.

@odewahn
Created October 19, 2022 20:36
Show Gist options
  • Save odewahn/2c0d515a838e65b0e9dcdd0c6e177c29 to your computer and use it in GitHub Desktop.
Save odewahn/2c0d515a838e65b0e9dcdd0c6e177c29 to your computer and use it in GitHub Desktop.
Clone a github repo into google drive using google colab

Here's how to import a github repo into drive using google colab.

In the first cell, import the drive package and mount you google drive:

from google.colab import drive
drive.mount('/content/drive')

In the next cell, put a bash script that just clones whatever repo you want:

%%bash
cd /content/drive/MyDrive/
mkdir -p deep-learning-for-coders
cd deep-learning-for-coders
git clone https://github.com/fastai/course22.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment