How to use Git / GitHub with Jupyter Notebook

How to use Git / GitHub with Jupyter Notebook

Git-101 for Jupyter notebook users!This is a Git-101 for Jupyter users that are not familiar with Git / GitHub. It’s a hands on tutorial & is meant to be comprehensive. Feel free to skip a section if you are already familiar with the steps. At the end you’ll be able to, Push your notebooks to a GitHub repository Start versioning your notebooks + learn how to revert to a specific notebook version

This is a Git-101 for Jupyter users that are not familiar with Git / GitHub. It’s a hands on tutorial & is meant to be comprehensive. Feel free to skip a section if you are already familiar with the steps. At the end you’ll be able to,

  • Push your notebooks to a GitHub repository
  • Start versioning your notebooks + learn how to revert to a specific notebook version
  • Get feedback & discuss notebook changes with your peers
  • Easily share your notebooks for others to view

Create GitHub Account

If you don’t have a GitHub account please create one here.

Setup Git Locally

  • Download and install the latest version of Git.
  • Setup your name & email in git by running following commands on terminal —
>> git config --global user.name "Mona Lisa"
>> git config --global user.email "[email protected]"

Create New Repository

A GitHub repository is like your supercharged folder in the cloud. You can store files (notebooks, data, source code), look at historical changes to these files, open issues, discuss changes and much more. People typically create one repository per project.

Let’s go ahead & create a repository on GitHub. Once created, you’ll see a page like below, copy the highlighted repository URL.

Image for post

Clone Repository

Let’s clone the GitHub repository on our machine by running following command on the terminal. It will create projectA directory on our machine which is linked to amit1rrr/projectA repository on GitHub. Replace [https://github.com/amit1rrr/projectA.git](https://github.com/amit1rrr/projectA.git) with your own repository URL from the above step —

code-review jupyter-notebook version-control github git

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How to version control Jupyter Notebooks

Let’s look at all the tools you can leverage to make notebooks play nicely with modern version control systems like git. Jupyter notebooks are fantastic in many ways but collaboration is not so easy with them. In this article we’ll look at all the tools you can leverage to make notebooks play nicely with modern version control systems like git

Softagram - Making Code Reviews Humane

The story of Softagram is a long one and has many twists. Everything started in a small company long time ago, from the area of static analysis tools development. After many phases, Softagram is focusing on helping developers to get visual feedback on the code change: how is the software design evolving in the pull request under review.

Version Control with Git & GitHub | Git & GitHub Tutorial For Beginners

This Edureka video on "Git Tutorial" will talk about the Version Control System & Version Control Tool - Git. You will learn about several Git commands and Git Operations with example.

Introducing GitPlus: Version Control extension for Jupyter

JupyterLab extension to push commits & create pull requests on GitHub. There’s no easy way to version control notebooks from Jupyter UI. Of course you can drop down to command line & learn a bunch of git commands to version control your notebooks. But not everyone using Jupyter is proficient at git. Hence I built GitPlus, a JupyterLab extension that provides the ability to commit notebooks & create GitHub pull requests directly from JupyterLab UI.

Effective Code Reviews: A Primer

Peer code reviews have increasingly been adopted by engineering teams around the world. Here are 6 tips to make the process better for teams.