Source Control

Workspaces, projects, and underlying resources manipulated in Semarchy xDI Designer use exclusively file storage. To facilitate team collaboration, using a Version Control System such as Git is highly recommended.

Configure Source Control With Git

The EGit plugin is shipped with Semarchy xDI Designer to control sources with Git. The following sections describe the most common operations that are performed by developers in the Designer. For more details and advanced features, refer to the EGit User Guide.

Identify Yourself

Start by verifying the username and email that will be used when you commit changes.

  1. Click Window > Preferences > Team > Git > Configuration.

  2. Verify the existence and the value of the following properties, and add or update them if needed:

    • user.email: Must contain your email.

    • user.name: Must contain your Git username.

  3. To add a missing property, click Add Entry.

git configuration

Clone an existing project from a GitHub repository

SSH is the recommended authentication method for GitHub.

To connect to an existing repository using SSH and clone its content:

  1. Start by verifying your SSH connection:

    1. Open the Preferences Dialog (Window > Preferences).

    2. Navigate to General > Network Connections > SSH2 .

    3. Ensure that your SSH2 home is configured correctly (the usual value is ~/.ssh) and that the Private Keys list contains a SSH2 key that is declared on GitHub. +

      • If an existing key is missing, click Add Private Key to add it.

      • To generate a new key:

        1. Select the Key Management tab.

        2. Click Generate RSA Key.

        3. Click Save Private Key. The saved key is automatically added to the list of keys in the General tab.

        4. Select and copy the content of the public key to the clipboard.

        5. Add this public key to your GitHub account by following this https://docs.github.com/en/authentication/

  2. Open the Git perspective:

    1. Select Window > Perspective > Open Perspective > New.

    2. Select Git and then click Open.

  3. Select Clone a Git repository in the Git Repositories perspective.

  4. Enter the connection parameters and then press Next: +

    • URI: ssh://git@github.com/<user_or_organization>/<repository>.git with:

      • <user_or_organization>: user or organization that hosts the repository.

      • <repository>: name of the repository + Example: git@github.com/mycompany/repo.git

    • Host: Automatically populated, keep unmodified.

    • Repository Path: Keep unmodified.

    • Protocol: SSH (keep unmodified).

    • User: git (keep unmodified).

    • Password: keep empty.

  5. Select the branches you want to synchronize. Press Next.

  6. On the next and last page of the wizard, enter the Local Destination parameters: +

    • Directory: The directory which will contain the Git repository (created by the wizard if it does not yet exist). + NOTE: It is recommended to store the Git repository outside of the Designer workspace.

    • Initial branch: Select the local branch to checkout initially.

  7. Click Finish.

  8. Add projects from the Git repository to your workspace:

    1. Right-click Working Tree in the Git Repository and then select Import Projects in the contextual menu. import projects

    2. Select the projects to import and click Finish.

Commit and Push Changes

To share your changes with other designers working on the same project, you must stage, commit and push these changes to the Git repository:

  1. From the Git or the Semarchy xDI Designer perspective, open the Git Staging view.

    If the Git Staging view is not visible, proceed as follows:
  2. Open the Show View dialog (Window menu > Show View > Other).

  3. Expand the Git folder and then select Git Staging.

  4. Select the Unstaged Changes you want to commit and click the stage button to add them to the list of Staged Changes.

  5. Enter the Commit Message and then click:

    1. Commit and Push to commit the changes and push them immediately to the remote Git repository.

    2. Commit to only commit the changes and push them later.

      commit staged changes

To push changes that have already been committed:

  • From the Semarchy xDI Designer perspective:

    1. In the Project Explorer, right-click the project for which you have committed changes and then select Team > Push Branch {branch name}.

    2. Review the Source and Destination parameters (in particular the destination Branch), select the wished merge or rebase method in the When pulling dropdown list, and then click Preview. push configuration

    3. Verify the result of the push’s preview and then click Push. push preview

Pull Changes

To retrieve the latest changes, you must pull them from the remote repository:

  1. In the Project Explorer, right-click the project for which you want to retrieve changes.

  2. Select Team > Pull in the contextual menu.