JupyterHub
HomeServicesDocumentationBlog
1.0.0
1.0.0
  • Introduction
  • Determine Your Workflow
  • About Jupyter Notebooks
  • About JupyterHub
  • Computing Policies
  • ❓Help and Support
    • Getting Support
    • FAQ
    • Known Issues/Bugs
    • Instructor's Checklist
    • Additional Resources
  • Getting Started
    • Sign In
    • Import Notebooks
    • Launch a Notebook
    • Launch a Terminal Session
  • Using Your Hub
    • Interface Overview
    • Creating a New Blank Notebook
    • Managing Active Notebooks
    • Shutting Down Server
  • Content Sync via Link
    • Link generation
  • CONTENT SYNC VIA GIT
    • Git Overview
    • Create GitHub Account
    • Set Up Git in JupyterHub
    • Downloading Content
    • Saving and Uploading Content
    • GIT Cheatsheet
  • Github Classroom (Student Guide)
    • Getting Started
    • Getting and Uploading Assignments
  • GitHub Classroom (Instructor Guide)
    • Overview
    • Getting Started
    • Distributing Homework
    • Distributing Lectures
    • Learning Management Systems
  • ADVANCED TOPICS
    • Package Installation
    • Accessing Classic Notebook
    • Slideshow Plugin
    • VSCode
    • SQLite
    • RStudio and Shiny
    • Dash
  • Reproducibility
    • Replicating the Environment
    • Using Docker
Powered by GitBook
On this page
  • 1. Saving your work using GIT Plugin (UI)
  • 2. Saving your work using GIT command line
  • 2.1: Open terminal and move to working assignment directory
  • 2.2: Commit Changes to be Saved (git add/commit)
  • 2.3 Save Changes to Repository (git push)
Export as PDF
  1. CONTENT SYNC VIA GIT

Saving and Uploading Content

PreviousDownloading ContentNextGIT Cheatsheet

Last updated 5 years ago

Once you have made changes to an assignment and are ready to save your progress, there are a few steps that you must do prior to closing the hub if using git to keep your changes save. Once again, the interaction with git can be via Plugin user interface or a terminal session

1. Saving your work using GIT Plugin (UI)

Saving your changes and uploading them to GitHub is outlined and illustrated below:

  1. Select the Git Plugin tab from the left sidebar

  2. Files that have chaged will show under the Changed category. New files will appear under the Untracked category. Use to move your changes to the staging area () and use the to unstage.

  3. Once all files have been staged, you can commit your changes by typing a commit message

  4. Confirm your commit

  5. Finally, you need to push your commited changes to GitHub. You do so using the icon

Committing changes does not automatically save them to the repository! Don't forget to do step 5 and push the changes.

2. Saving your work using GIT command line

2.1: Open terminal and move to working assignment directory

  1. Launch a terminal on JupyterHub

  2. Navigate to your current working assignment directory using the cd command

cd assignmentDirectory

2.2: Commit Changes to be Saved (git add/commit)

From the directory containing your actively worked on assignment, you must first add and commit changes you have made which will be prepared to be saved remotely on the git repository. Think of this as staging any changes you have made, but not actually saving them yet. This first step provides the opportunity to add a commit message where you can document the changes you have made with this current save, which should be descriptive but not necessarily comprehensive.

git commit -a -m "Notes about changes"

Committing changes does not automatically save them to the repository! Don't forget to do step 3 and push the changes.

The -m flag means you are passing a commit message, which must be inside double quotes. If you forget to pass the message, it will launch the terminal editor emacs. You can type your message, save with Ctrl/Cmd+x then Ctrl/Cmd + s and quit using Ctrl/Cmd + x then Ctrl/Cmd + c

2.3 Save Changes to Repository (git push)

Once the changes have been stage following Step 2, the last step is to actually save the changes to the remote repository using the push command.

$ git push

It will require you to enter your github credentials and then will begin to save the changes to your remote repository for the git classroom.

It is recommended that you git commit and push at the end of each working session or whenever a major change has been made to the codebase.

review git basic commands
Git stage-commit-push flow via plugin UI