Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Git

Prerequisite



Gitpuller


nbgitpuller pulls any changes to your tracked notebook repositories through a jupyter extension nbgitpuller-jl-interface.

The nbgitpuller-jl-interface extension will check for any pending updates and alert you to it’s status.

Gitpuller Merge Conflicts

If a user has made changes to a notebook and the same notebook has been updated in its repo, the following will occur:

Users will retain two copies of the same notebook.

Example:

Before Edit

After Edit

You can read more about the merging behavior of nbgitpuller here


In the case of a broken Git state


Due to its complexity, it is common for users to break Git workflow. A broken Git state can lead to unexpected results, such as notebooks not being updated.

Below are the steps users can take if the Git workflow is in a state beyond their ability to repair.

Repair Process:

  1. Preserve any files/directories you wish to keep under the /home/jovyan/notebooks directory.

    • Either *download or move out items you wish to keep.

  2. Delete the entire /home/jovyan/notebooks directory.

    • Use rm -rf /home/jovyan/notebooks on the terminal to delete all.

  3. Restart your server.

  4. Gitpuller will automatically clone a clean repository into your account.

*NB: When downloading a directory, users may compress them first to optimize downloading. The below commands will allow users to (de)compress files/directories:

Where <name> can be anything you wish.


Using Other Git Repos in OpenScienceLab


If you wish to utilize repositories other than those hosted by ASF, you can clone them into your OpenScienceLab account. However, users will need to manage the repos that they clone to prevent any issues.

When cloning a repository from elsewhere, users must ensure not to nest git repositories, i.e., do not clone a repository within another repository.

To avoid complications, clone your repos to /home/jovyan.