In this guide, you'll learn how to create, save, and push notes to GitHub using,
Jupyter Notebook (Installed on PC)
Google Colab (Online, No Installation Needed)
π Part 1: Jupyter Notebook
1οΈβ£ Installing Python & Jupyter Notebook
Before using Jupyter Notebook, you need to install Python and Jupyter.
β Step 1: Install Python
Download Python from python.org and install it.
β Step 2: Install Jupyter Notebook
Once Python is installed, open the terminal and run:
In [ ]:
pip install notebook
2οΈβ£ Creating Your First Jupyter Notebook
To open Jupyter Notebook, run:
In [ ]:
jupyter notebook
Click New β Python 3 Notebook.
Rename it to MyNotes.ipynb.
Use Markdown cells for writing text and Code cells for calculations.
3οΈβ£ How to Push Your Notes to GitHub
There are two ways to upload your Jupyter Notebook to GitHub:
Using Git Command Line (CLI)
Using GitHub Desktop
π Using Git CLI
In [ ]:
git add MyNotes.ipynb
git commit -m "Added Jupyter Notebook notes"
git push origin main
π Using GitHub Desktop
Open GitHub Desktop and select your repository.
Click Commit to main β Then Push to GitHub.
π Part 2: Google Colab
Google Colab is an online alternative to Jupyter Notebook that requires no installation.
β Steps to Use Google Colab
Go to Google Colab.
Click File β New Notebook.
Rename it and start writing your notes.
β Saving Google Colab Notes to GitHub
To push a notebook from Google Colab to GitHub:
Click File β Save a copy in GitHub.
Select the repo and add a commit message.
Click OK, and it will be uploaded!