Can I push/pull directly from my google drive online?

后端 未结 7 2169
滥情空心
滥情空心 2020-12-03 06:27

There are methods to sync my local git repository over to my google drive via google drive sync windows application, but I was wondering whether I could bypass its need alto

7条回答
  •  旧巷少年郎
    2020-12-03 07:09

    Eduardo Rosas has an article on how to do this using colab (only a browser required). essentially you access your google drive using:

    from google.colab import drive
    drive.mount('/content/gdrive')
    #cd to the google drive you using the magic command
    %cd /content/gdrive/'My Drive'/[your drive folder for repo]
    #check your directory location with
    !pwd
    #clone your repo - Note this exposes your password so don't make the notebook public
    !git clone https://LaloCo:password%23@github.com/LaloCo/handson-ml.git
    #I find using a github personal access token easier
    !git clone https://user:PAT@github.com/repo
    

提交回复
热议问题