Managing your Studio project sources on your own is now possible with the External Source Repository feature. It allows more flexibility on your project sources lifecyle:
- Pull requests
- History edition / Force push
- Custom hooks and validation workflows
- etc...
Step 1: Navigate to Settings to enable Git external repository
Within your Studio project, navigate to the top-right corner and locate the "Settings" button.
OR
- From the Connect dashboard "My Studio Projects" page, locate your Studio project and click on the "Edit" button.
Step 2: Configuring Git Credentials
On your project settings page, navigate to the "source repo" tab.
Fill the form with your external Git repository URL and the associated credentials.
Requirements for the external Git repository are the followings:- It has a "master" branch
It is empty or has the required folder structure: this structure can change along with Studio versions so it's recommended to start with an empty repository or with a recent copy of an existing Studio project sources.
PRO TIP: A Studio project sources can be copied either by direct Git access (https://doc.nuxeo.com/studio/how-to-work-with-git-and-studio-project/) or within the .metadata folder of Studio project zip package
Enable the "External Source Repository" toggle button and click "Save".
Once the enablement process is complete, your Studio project is now linked to the specified external Git repository associated with your studio project.
The WIP branch concept
While editing your project using the Studio UI, you will notice the creation of branches with the following pattern in your external Git repository:
wip/[USERNAME]_[USERHASH]/[FEATURE_BRANCH]
These branches are used as workspaces for each user working on a specific feature branch and are not meant to be edited "manually" unless you know what you are doing, otherwise the corresponding user may not be able to load the UI. Nevertheless, playing with these branches can sometimes be useful and allows you to control what is effectively loaded when doing hotreloads for example !
Commit preferences
The recommended Commit preferences when External Source Repository is configured is "Advanced" or "Intermediate", the "Simple" mode will have degraded performances when hitting the "Save" button has the automatic pull/merge will be triggered every time.