How to Upload Project on GitHub from Jupyter Notebook? - GeeksforGeeks

05 Aug, 2021
A Jupyter notebook is neither a simple text editor nor a full-featured IDE, rather it is an electronic file which contains both programming code and text descriptions. It can also contain embedded charts, plots, images, videos, and links. They run in a web browser like Firefox or Google Chrome. 
They can contain code of various programming languages, though are mainly popular for Python with .py extension, they also support Markdowns with .md extension. One way to think of a Jupyter notebook is as a combination of the Python REPL and a Python module .py file with a markdown .md file thrown in between code sections.
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 further installation steps are necessary. 
You can install of Anaconda in windows.
Once it is installed, open the Anaconda Navigator to get started with jupyter Notebook. 
Here, launch the Jupyter Notebook.
A Jupyter file browser will open in a web browser tab, you will see your base(home) directory. 
There in the upper right section, you can click the New(dropdown) -> Python3
After that, a New tab of Jupyter notebook will open in you browser.
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 above. 
So, this is our code:
Click on File -> Download as -> Notebook(.ipynb)Make a new repository into Github.Click Add Files -> Create New File.Browse through your directory and upload your file (example filename: GeeksForGeeks.ipynb) and click Open.Commit the changes.
Click on File -> Download as -> Notebook(.ipynb)
Make a new repository into Github.
Click Add Files -> Create New File.
Browse through your directory and upload your file (example filename: GeeksForGeeks.ipynb) and click Open.
Commit the changes.
Note: Git should be installed in the system.
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 master 
Great! Now you have uploaded your first Notebook Code into GitHub.
pavanmarri
varshagumber28
python-utility
Git
Python
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Comments
Old Comments
Difference Between Git Push Origin and Git Push Origin Master
How to Push Git Branch to Remote?
How to Export Eclipse projects to GitHub?
Git - Difference Between Git Fetch and Git Pull
Merge Conflicts and How to handle them
Read JSON file using Python
Adding new column to existing DataFrame in Pandas
Python map() function
How to get column names in Pandas dataframe