Jupyter学習ノート_005
GitHubのリポジトリをgoogle colabにcloneする方法
下記の手順です。
- google drive をマウントする
google_drive.py
from google.colab import drive
drive.mount('/content/drive')
- git clone で指定した場所にリポジトリを作成する
git_clone.py
import shutil
import os
#カレントディレクトリを変更する
os.chdir('/content/drive/My Drive')
cur_dir = os.getcwd()
git_name = '/MongoDB_PyMongo_Tutorial'
git_folder = cur_dir + git_name
#存在すれば削除する
if os.path.exists(git_folder):
shutil.rmtree(git_folder)
#クローンする
!git clone https://github.com/Giffy/MongoDB_PyMongo_Tutorial.git
Author And Source
この問題について(Jupyter学習ノート_005), 我々は、より多くの情報をここで見つけました https://qiita.com/dmkd3006/items/ff08c2b1aa31cda234a7著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .