Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Latest commit

 

History

History
87 lines (53 loc) · 3.88 KB

push-changes.md

File metadata and controls

87 lines (53 loc) · 3.88 KB

Push your changes on your GitHub repo

This section will show how you can push your changes to your GitHub repo directly from the Jupyterlab Git extension. The only thing you need is a GitHub token. You can create one following GitHub docs: create GitHub token.

Push your changes using JupyterLab Git extension

If you are running this tutorial on Operate First your work-in-progress notebooks can be saved in your JupyterHub PVC by hitting the save button on the top panel. Nevertheless, it is a good practice to push your changes to the GitHub repo when you finish working on your project, so that all your work can be saved.

In order to do that from within JupyterLab using the Jupyterlab Git extension:

  1. Go to Git Box panel on the left to check what files have been changed.

    Go to Git Box Panel
  2. Stage the files you want to push to your GitHub repo.

    Stage the files
  3. Add Summary of your changes (a.k.a commit message) and select Commit.

    Commit Changes

    NOTE: If you are doing this for the first time, git requires user email and user name to be set.(The extension will open a Dialog Form to insert them)

    Insert User Name and Email
  4. Select Push Changes.

    Use Button to Push Changes
  5. Insert your Github account name and your GitHub token to push to the GitHub repo you cloned.

    Push Changes with GitHub token

Push your changes using the terminal in JupyterLab

If you want to clone a repo and push changes through the Terminal, you can use the following steps.

  1. Open terminal from the icon in the Launcher.

    Open Terminal
  2. Start using the git commands:

    Use Git Commands
  • git clone <repo> to clone a new repo.

  • git add <file> after you modify files to put them in stage.

  • git commit -m "<commit message>" to commit the changes in stage. NOTE: If you are doing this for the first time, git requires user email and user name to be set.

    First commit
  • git push origin <branch> to push your changes.

Next Step

Setup bots and pipelines to create releases, build images with overlays and enable automatic dependency management

References