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.
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:
-
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.
If you want to clone a repo and push changes through the Terminal, you can use the following steps.
-
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.
Set bots and pipelines to enable automatic dependency management and automatic build after release