I'm on a Chromebook (stock setup), but relatively new to the whole coding business. Presently, I'm trying to gain familiarity with Google Colaboratory coupled to Google Drive to do data analysis anywhere.
My problem, then is this: Since I can access Github via !git
automatically in Colab, I created a new repository and cloned it. But I can't add the .ipynb
because !git status
shows no changes/doesn't see the notebook I'm in as a file. How can I push the .ipynb
from my Google Drive back to Github?
Basically, I hope to pull up Colab anywhere, play with my data, save the changes in the .ipynb, push to Github, and go elsewhere to keep playing with the data.
Manual copying likely would work, but is there a more elegant solution?
TIA!
How to open Google Colab. You can open a new Colab notebook from your Google Drive window or by visiting the Colab site. From the Colaboratory site, you can use the menu to upload an iPython notebook: This will upload the ipynb file that you downloaded before.
You have likely come up with a solution to this by now, but I see that there is now a "Save copy to Github" feature in Colab, quoted from this blog post:
You can also easily save a copy of your Colab notebook to Github by using File > Save a copy to Github…
@jaymullr, have you managed to find your way?
Here is the tutorial how to easily setup your notebook from github to Google Colab using Clouderizer: Medium tutorial. Okay, maybe what you wanted is the other way around, google Colab to github. The exciting things is that using clouderizer allows you to do both! Sync your jupyter notebook, github, and Colab. My steps might seems rigorously long but it's actually really easy, one time setup for all. Here is how I do it (skip to Sync back to GitHub if you just wanna know the big picture of how):
$git push origin master
. That's it!If you find my way interesting, hit upvote. However, this method might be too tedious at first. Let me know what you think! Clouderizer is free btw.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With