For users on version 1.47 or later, you can add Git repositories to a Domino project.
These repositories are made available to your runs and notebook sessions allowing you to access them just as you would your Domino files. This article explains how you can add your repository to the project, access the added repository from within a notebook session and finally, commit any changes back to the git repository.
Public and private repositories are supported. If the git repository you'd like to add to your Domino project requires authentication, you will need to set up authentication in your Domino account settings.
Follow these instructions to set up your Git credentials (personal access token for HTTPS and private keys for SSH).
Adding a repository to a project
Git repositories are added at the project level, and you can add multiple repositories to one project. To add one for the first time, navigate to the "Files" tab of the project
Scroll down to the “Repositories” panel, and click on “Add new Repository”.
Note: if you do not see a Repositories section on the Files page, then this feature is not enabled for you. Please speak with your system administrator or contact us at email@example.com to enable Git repository integration.
Specify the URI and desired name for the repository
- We support HTTPS and SSH URIs
- Public and private repositories are supported. For private repositories, be sure to set up your Git credentials (personal access token for HTTPS and private keys for SSH)
Specifying your branch
Domino allows you to connect to a specific git reference. For most users, they'll want to connect to the default branch which, with Github, will be the master unless set otherwise in Github; however, you can also specify a specific branch, tag or commit ID to use. This might be useful for someone who want to use their own branch of the repo or who had a tag specifying a version number, for example.
Accessing your repository
Once you've added your repository to your project, it will be mounted in a subfolder of
/repos each time you perform a run so you can access the files as needed.
If you edit the files in your git repository from your run, don't forget to
git push your changes to your external repository. Domino will automatically warn you if you attempt to close a notebook session without committing your changes back to your repository.
In RStudio, you can access your repository through the files pane. Your Domino project files will will be in
/mnt as normal, and now, a copy of your Git repository will be in a subfolder of the
/repos folder. You can browse to the
/repos folder by clicking the root (
/) path in the RStudio Files pane.
If you edit or add files in your repository, you can manually push and commit them back to github by using the Shell.
Once in Shell, you should navigate to your git repository and then use your standard git commands.
Jupyter Notebook Instructions
In a Jupyter notebook, you can open a terminal session, navigate to your repository and then perform your standard git commands.
Keywords: Git, Github, Bitbucket