Using Git with workflows

In your IBM® Concert Workflows® instance, you can connect to a remote Git repository, then push your workflows to the repository or pull them from the repository into your instance. You can work with GitHub, GitLab, or Bitbucket repositories.

Important: Git operations apply only to the current folder and its subfolders. When you pull from or push to Git, only the workflows and subfolders within the current folder are affected.

Before you begin

You must have a GitHub account and an established repository. Decide which workflows you want to push into your repository and which to pull from it.

Connecting to a Git repository and branch

  1. If you do not have a configured authentication to the repository, create one.
    1. If you are connected to another application, click Workflows.
    2. In the IBM Concert Workflows® sidebar, click Authentications, then + Create authentication.
    3. Give the authentication a unique name and, optionally, a description.
    4. In the Service dropdown, select Git.
    5. Provide the Git service credentials.
      URL
      The unique link of your Git repository. Specify the full path ending in https://github.com/my_user/flek3s.git, for example, <your-project>.git.
      Branch
      The repository branch that you want to use.
      • You can manually enter the branch name now or click Overridable if you prefer to select it when you set up the Git configuration.
      • If you enter a branch name now and you do not click Overridable, then the branch cannot be changed after you save the authentication.
      • If you enter a branch name now, make sure you enter the name of a branch that exists in the repository.
      Username
      The username associated with your Git provider.
      Password
      The password associated with your Git username. If you are using GitHub Cloud or Enterprise, the password must be a personal access token for the user.
      Email
      The email address associated with your Git username.
      RSA private key
      The private key that is used for SSH key authentication, if you are using SSH instead of password or token authentication.
    6. Click Save.
  2. In the IBM Concert Workflows® sidebar, click Workflows and open the folder that you want to synchronize with the Git repository.
  3. Click the overflow (three-dot) menu and click Git Config.
  4. In the dialog, in the Auth Key field, select the authentication that you created in step 1.
  5. Optional: If you made the branch overridable when you created the authentication key, select the repository branch that you want to use for pushing and pulling your workflows.
  6. Click Save.
    Your folder now points to the root of your Git repository that is specified in the authentication.
    Note: After you connect a folder to a remote repository, a Git configured chip appears next to the folder name in the breadcrumbs. This indicator shows that the folder has an existing Git configuration. When you click the chip, you can view the root of the Git configuration and the repository and branch details, if these are marked as overridable.

Git actions

After you connect a folder to a Git repository, you can perform the following operations:

Pull workflows from Git:
  • Pull from Git > Reset - Completely replace local content with Git content.
  • Pull from Git > Select and pull - Choose specific workflows and folders to pull.
  • Pull from Git (bulk actions) - Pull selected items using the bulk actions banner.
Push workflows to Git:
  • Push selected workflows and folders - Push specific items using the bulk actions banner.
  • Push a single workflow - Push one workflow from its Actions menu.
  • Push folder to Git - Overwrite entire Git folder with local folder contents.
Manage Git configuration
  • Edit Git configuration - Update repository branch settings.
  • Delete Git configuration - Remove Git connection from folder.
Pull from Git > Reset

Use this option when you want to completely replace all local workflows and subfolders in the current folder with the contents from the corresponding folder in the Git repository.

Warning: This operation performs these actions:
  • Overwrites all matching local workflows and folders with the Git versions.
  • Deletes locally created workflows and folders that do not exist in Git.
  • Potentially causes incoming API calls and scheduled jobs to fail if existing workflows are overwritten or deleted.
Tip: Use the Pull from Git > Reset option during initial setup or recovery scenarios, for example, when you need to discard local changes and realign the folder with the remote Git repository.
To reset workflows and subfolders in the current folder, complete these steps:
  1. In the overflow (three-dot) menu, click Pull from Git > Reset.
  2. In the Reset workflows and folders dialog, review the warning about the consequences of proceeding.
  3. If you want to select specific workflows and folders instead, click Select and pull to open the Select and pull workflows and folders dialog.
  4. If you are happy to proceed with the reset, click Reset.

    All local workflows and folders in the current folder are deleted and replaced with the contents of the Git repository.

Pull from Git > Select and pull

Use this option when you want to choose specific workflows and folders to pull from Git, while preserving other local content.

  1. In the overflow (three-dot) menu, click Pull from Git > Select and pull. In the Select and pull workflows and folders dialog, the contents of the corresponding Git folder are displayed.
  2. Optional: Use the search field to find specific workflows and folders within the current Git folder.
  3. Select the Git workflows and folders that you want to pull.
  4. Click Pull selected.
Pull from Git using the bulk actions banner

When you select one or more workflows in the Workflows page, the bulk actions banner appears with options to manage the selected workflows. If Git is configured and the current workflow folder exists in Git, the Pull from Git option is available.

To pull workflows using the bulk actions banner:

  1. Open the Workflows page and select one or more workflows or folders.
  2. In the bulk actions banner, click Pull from Git.

    A toast notification confirms that the pull is starting.

The system checks whether at least one of the selected workflows exists in the remote repository (either workflows selected directly or workflows that are contained within a selected folder).
  • If none of the selected workflows exist remotely, the system displays a warning message that the Git Select and pull operation failed.
  • If at least one selected item exists remotely, the system proceeds with a partial pull and retrieves only the matching workflows from the repository.
Push workflows to Git

You can push workflows to Git by selecting specific workflows and folders, or by pushing a single workflow.

Note: Only the latest version of a workflow can be pushed to Git.
Push selected workflows and folders
  1. Select one or more workflows or folders in the Workflows page.
  2. In the bulk actions banner, click Push to Git.
  3. In the dialog, add a meaningful commit message and click Push.

For each selected workflow, if the workflow exists in Git, it is overwritten by the version from your instance. If the workflow does not exist in Git, it is created. Workflows that exist in Git but not in your instance remain unchanged.

For each selected folder, if the folder exists in Git, all workflows in the folder are treated as if you selected them individually. Workflows that exist in Git are overwritten by the versions from your instance. Workflows that do not exist in Git are created. Git workflows that exist in the folder but not in your instance remain unchanged.

Push a single workflow
  1. In the Workflows page, locate the workflow that you want to push.
  2. Click the Actions menu for the workflow, then click Manage > Push to Git.
  3. In the dialog, add a meaningful commit message and click Push.

    If the workflow exists in Git, it is overwritten. If it does not exist, it is created.

Push a folder to Git: overwrite repository content
Warning: This operation overwrites the contents of the target Git folder with the contents of the local folder. The system does not detect or warn about conflicts. Any workflows or folders that exist in Git but not in the local folder are removed.
To replace the Git content with the contents of the local folder:
  1. In the Workflows page, locate the folder you want to push to Git.
  2. Open the folder in the workflows list.
  3. Click the overflow (three-dot) menu, then click Push to Git.
  4. In the dialog, review the override warning, add a commit message and click Push.
Edit the Git configuration
  1. In the overflow (three-dot) menu, click Edit Git config.
  2. In the dialog, update the repository branch. You can update this field if you specified it as overridable when you created the authentication key.
  3. Click Save.
Delete the Git configuration
  1. In the overflow (three-dot) menu, click Delete Config.
  2. In the dialog, review the warning.
  3. When you are happy to proceed, click Delete.