If you don't have a GitHub token, you can create one following GitHub docs: create GitHub token.
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 JupyterHub using the Jupyterlab Git extension:
-
Go to Git Box panel on the left to check what files have been changed.
-
Stage the files you want to push to your GitHub repo.
-
Add Summary of your changes (a.k.a commit message) and select Commit.
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)
-
Select Push Changes.
-
Insert your Github account name and your GitHub token to push to the GitHub repo you cloned.
Jupyterlab Git extension is limited to one repository at the moment. Therefore if you want to clone another repo and push changes you need to use the git commands from the Terminal.
-
Open terminal from the icon in the Launcher.
-
Start using the 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. -
git push origin <branch>
to push your changes.
Once you are satisfied with your changes you can open a Pull Request directly from your fork.
Set bots and pipelines to create releases, build images and enable dependency management