Using a Git Repository in Notebook Sessions
Clone Git repositories and use Git commands in a notebook session.
You can use the file browser in JupyterLab to view the Git repository and a terminal window to run Git commands as you would with any Git repository.
If you don't have a private key, you can create one in the notebook session by
running the ssh-keygen
command in the JupyterLab environment.
These instructions use a Git repository as an example though the steps are similar for other repositories. Flows between third-party version control providers and internal Git servers might differ.
You can also use the Git extension by clicking the Git icon in the navigation panel inside the notebook session to make authenticating users, creating branches, committing and pushing changes, and cloning easier. First, initialize a new repository by clicking Initialize. The repository is displayed showing the current branch, changes (staged, changed, and untracked), and history. When you make changes to the repository, you can add comments and commit the changes using the dialogs. Next, push the changes by clicking the push button at the top of the panel, and supplying your Git credentials. You can use the pull and refresh buttons to ensure that the repository is up-to-date. If errors occur, they appear in the lower-right corner, and you can click the error to get more information.
You can also use the Git extension by clicking the Git icon in the navigation panel inside the notebook session to make authenticating users, creating branches, committing and pushing changes, and cloning easier.
You can use the pull and refresh buttons to ensure that the repository is up-to-date. If errors occur, they appear in the lower-right corner, and you can click the error to get more information.