Syncing project assets

If you associated your project with a Git repository, you can sync between the repository and your project. Associating a project with Git is useful for working with notebooks or Python scripts in JupyterLab, collaborating on R Shiny apps in RStudio, or exporting assets to share across projects. You must sync your code assets that are created in IDEs with your project to run those assets as jobs in a project or deployment space (Shiny apps).

You can:

  • Push selected project assets to the repository

  • Pull changes that are made to files from the repository branch that was selected at the time the project was created to the project. Zero length files are ignored and not pulled. The following file types are pulled to the project:

    • Notebook files (.ipynb files)
    • Regular Python scripts (.py files)
    • R scripts (.R files)
    • R Shiny apps

    To see your changes in the project, you must first commit and push them from JupyterLab or RStudio to the project repository. Then, synchronize the repository with your project.

To sync changes in your project and the repository:

  1. In your project, click the Sync icon Sync from the project toolbar.

  2. Select Pull only to pull the changes that are made to files in the Git repository into your project. The pull operation might create, update, or delete assets in your project based on the changes that were pushed to the repository. Only changes to notebook files, Python scripts, or R Shiny apps are pulled, changes made to other file types are not pulled. Notebooks, scripts, or RShiny apps that were pushed to a Git repository with a size of zero bytes are considered invalid and are not pulled into the project. Also, hidden notebook files, Python scripts, or R Shiny apps are not pulled.

  3. Select Pull and push to push the new state of the project assets to the Git repository. You are asked to select which project assets to push to the repository. Only files of the supported file types are listed.

    Important: You must perform both synchronization steps to fully synchronize the project with the Git repository. The first step pulls the recent changes from the Git repository to the project. The second step pushes the accumulated changes from the project to the Git repository.