Use the IDE
If you prefer a user interface, or you do not have much experience using a terminal, you can use your Git service provider’s user interface (such as GitHub) with the actions in a Domino workspace’s navigation pane. Click on File Changes to perform actions such as Select and Sync (if configured in your environment), Sync to Domino, and Pull.Use the terminal
Start a terminal in your workspace and use Git just like you would in a local environment. See the Git cheatsheet for common workflows.Use the plugin
Many IDEs integrate with Git or have plugins or extensions for Git. Domino’s Git-based projects fully support these features. You can use them to interact with Git in Domino. See the following resources for information about how to use Git with your IDE:- Jupyter – How to version control Jupyter Notebooks.
- RStudio – Managing - Part 2 (GitHub and RStudio).
- VS Code – Using version control in VS Code.
Commit and push changes to your Git repository
In a Git-based project, the default working directory for your project’s code is
/mnt/code.Commit changes to your code and push them to your repository
- Go to the workspace where you made changes to a file.
- In the navigation pane, click File Changes.
- In the Code section, expand Uncommitted Changes to view changes. The up (↑) arrow in the Code section indicates the number of commits that your branch is ahead of the upstream branch, while the down (↓) arrow indicates the number of commits that your branch is behind the upstream branch.
- Enter a commit message.
- Click Sync to Git. If your administrator enabled the option for you to select the changed files to commit, click Select and Sync.
- If you clicked Select and Sync, select the files to sync.
- Enter a commit message and click Sync to Git. Domino syncs and pushes your changes to your Git repository.
Commit all changes to your Git repository
You can use Domino to commit and push all changes to the project’s Git repository. This is often referred to as syncing your changes.- Go to your workspace.
- In the navigation pane, click File Changes.
- In All Changes, enter a commit message.
- Click Sync All Changes. Domino commits changes to your code and syncs them to your Git repository. It also commits changes to artifacts and syncs them to the Domino File System (DFS).
In a Git-based project, the default working directory for your project’s code is
/mnt/code.Pull the latest changes from your Git repository
When you collaborate with others in Git-based projects, you must pull the latest changes to your code occasionally.- Go to your workspace.
- In the navigation pane, click File Changes.
- In the Code section, click Pull. Domino pulls the latest changes into your workspace.
In a Git-based project, the default working directory for your project’s code is
/mnt/code.Resolve merge conflicts
You might encounter merge conflicts when you collaborate with colleagues. To resolve merge conflicts, you can use the Git service provider or a terminal.Resolve conflicts with the Git service provider
When merge conflicts arise, Domino creates a new branch with the conflicts in your repository and pushes them to your Git service provider (such as GitHub or Bitbucket).- Go to your Git service provider.
- Use your Git service provider’s application to create a pull request between the newly created branch and your original branch.
- Merge the pull request.
-
Return to Domino.
Do not pull any changes.
- Start a workspace terminal.
- Use the following to reset the branch:
name-of-branch is the name of your original branch.
- Click Pull. Domino pulls the resolved merge conflicts. Your branch is now free of merge conflicts.