Skip to main content Skip to complementary content

Enabling the standard Git storage mode

Two Git storage mechanisms are available in Talend Studio: a standard storage mode and a customized one. The customized Git storage mode is implemented using multiple working trees:

  • Every branch on a repository is checked out in a separate folder within a repository folder <studio-workspace>\.repositories\<repo-hashcode>.
  • Using Git commands in Git tools to manage your repositories and projects is not supported. As only a partial subset of Git functionality is implemented in Talend Studio, it is impossible to perform some Git operations like Git fetch on your projects.
Information noteNote: The customized Git storage mode is deprecated.

A Git storage mode based on the standard Git storage has been introduced to improve the way the Git objects for your repositories and projects are stored. A Git storage mode notification dialog box pops up in the bottom right corner after you install the Talend Studio monthly update. The Enable the standard Git storage mode option in Talend Studio Preferences dialog box and the new -Dgit.mode.standard parameter enable the standard Git storage mode.

The most important advantages of the standard Git storage mode over the customized Git storage mode are:

  • There is only one working tree after initializing a local repository and only one branch checked out within a repository folder <studio-workspace>\<repo-name>-<repo-hashcode> at every given time, thus saving the disk space.
  • It allows you to use Git commands in Git tools to manage your repositories and projects in a more powerful way. Note that you must exit Talend Studio when running Git commands in a Git tool.

The following diagram illustrates the differences of the way Git objects are stored within a local repository between the customized Git storage mode and the standard Git storage mode:

With the customized storage, the local repository folder contains the Git metadata folder and multiple working trees and multiple branches. With the standard storage, the local repository folder contains the Git metadata folder and one working tree and one branch.

Pay attention to the following before enabling the standard Git storage mode:

  • The standard Git storage mode is enabled by default for new workspaces.
  • If there are any invalid project references, you need to fix them according to your needs before enabling the standard Git storage mode. For more information, see Fixing invalid project references for the standard Git storage mode.
  • You must commit all your changes before enabling the standard Git storage mode. Otherwise, your changes will be lost if you switch to another branch when Talend Studio restarts after enabling the standard Git storage mode.
  • The Enable the standard Git storage mode option in Talend Studio Preferences dialog box applies to all repositories in your current workspace. If you want to enable the standard Git storage mode in all your workspaces, set the -Dgit.mode.standard parameter to true in the corresponding .ini file under the Talend Studio installation directory according to your operating system.
  • If a repository has not been checked out, after the standard Git storage mode is enabled, the Git objects in the repository will be saved within a repository folder <studio-workspace>\<repo-name>-<repo-hashcode> for the standard Git storage mode after checkout.
  • If a repository has already been checked out, after the standard Git storage mode is enabled, the local repository will be automatically migrated upon project logon. The Git objects within the repository folder <studio-workspace>\.repositories\<repo-hashcode> will be kept, and the Git objects for the standard Git storage mode will be saved within another repository folder <studio-workspace>\<repo-name>-<repo-hashcode>.

    Alternatively, you can switch to a new workspace, enable the standard Git storage mode, and then check out the Git objects in the repository within a repository folder for the standard Git storage mode directly.

  • If you disable the standard Git storage mode and work back in the customized storage mode for any reason, before enabling the standard Git storage mode again, you must delete the existing repository folder <repo-name>-<repo-hashcode> for the standard Git storage mode to migrate your changed Git objects to the standard Git storage mode.
  • If you have enabled the standard Git storage mode, when you log on to a remote project, Talend Studio checks the repository folder of the customized Git storage mode for the project and cleans up the folder automatically if it is not in use for 15 days, which helps save disk space.

    After cleaning up a repository folder of the customized Git storage mode, when you log on to any project in the repository, the Enable the standard Git storage mode option in Talend Studio Preferences dialog box appears dimmed and you can no longer change the Git storage mode.

Information noteWarning: In a future release, the standard Git storage mode will be applied automatically, and the customized Git storage mode will not be supported anymore.

About this task

To enable the standard Git storage mode:

Procedure

  1. If you want to enable the standard Git storage mode for all repositories in your current workspace:
    1. From the menu bar, click Window > Preferences to open the Preferences dialog box.
    2. On the tree view in the Preferences dialog box, expand Talend and then click Git Settings to display the relevant view.
    3. Select the Enable the standard Git storage mode check box.
      Git Settings section of the Preferences dialog box.
      The invalid references can be discovered only if you have logged in to the projects.
    4. Click Apply and Close to save the change and close the dialog box.
      Talend Studio restarts.
  2. If you want to enable the standard Git storage mode in all your workspaces:
    1. Add -Dgit.mode.standard=true in the corresponding .ini file under the Talend Studio installation directory according to your operating system.
    2. Restart your Talend Studio.

Results

The repository will be automatically migrated or checked out to a repository folder <studio-workspace>\<repo-name>-<repo-hashcode> for the standard Git storage mode upon project logon.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!