Open In App

How to Upload Project on GitHub from Jupyter Notebook?

Last Updated : 04 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Jupyter Notebook is an interactive web-based environment that allows users to create and share documents containing live code, equations, visualizations and narrative text. It’s widely used for data science, machine learning and academic research. In this guide you’ll learn how to upload your Jupyter Notebook project to GitHub both manually and using Git commands.

Installation of Jupyter Notebook:

The simplest way to install Jupyter notebooks is to download and install the Anaconda distribution of Python. The Anaconda distribution of Python comes with Jupyter notebook included and no other installation steps are necessary. You can install of Anaconda in windows.

Step 1: Open Jupyter Notebook

  1. Open Anaconda Navigator.
  2. Click “Launch” under Jupyter Notebook.
  3. A browser tab will open, showing your computer’s folders and files.
  4. To start a new notebook click New → Python 3 (top-right corner).

After that a New tab of Jupyter notebook will open in you browser.

Step 2: Create and Save Your Notebook

To save your Jupyter notebook firstly you need to rename it. Now click on the Untitled -> Rename prompt will open -> Rename your file. You can also click the code dropdown and select the Markdown field for explanation (paragraphs) or the Heading field for heading.

Then write some code in the Notebook. To Run the code press the Run button as depicted in the picture below

You can also delete the selected cell and add cell using options shown in below image:

Step 3: Upload Your Notebook to GitHub

There are two main ways to upload your Jupyter Notebook to GitHub. Firstly we can upload it manually. In Jupyter Notebook click File → Download as → Notebook (.ipynb).

You can also upload Using Git Commands

  • Open the folder where your notebook is saved.
  • Open the download location of the file (example filename: GeeksForGeeks.ipynb) in command prompt.
  • Then, make a new repository in GitHub and use the below commands in command prompt:
  • 1. git init
  • 2. git add README.md
  • 3. git add GeeksForGeeks.ipynb
  • 4. git commit -m “notebook first commit”
  • 5. git remote add origin https://github.com/{Your repo}/GeeksForGeeks.git
  • 6. git push -u origin main

Great! Now you have uploaded your first Notebook Code into GitHub.



Next Article
Article Tags :
Practice Tags :

Similar Reads