Skip to main content
Version: 8.2405.x.x RR

Connecting Inventories to Git

Review the best practices described in Git Setup before connecting your inventory to Git.

When you create a new inventory, you either enable or disable the version control functionality. If version control is initially disabled, you can connect to a version control system, such as Git, later on. Here we describe how to set up the Git connection.

  • For more details about creating an inventory, see Creating an Inventory.
  • For more details about using the version control functionality, see Publishing Inventories to Git.

Unversioned Inventories

Version control operations are not available for unversioned inventories. This means that:

  • The Inventory Settingsscreen does not show any version-control-related inventory information (no. 1 in next figure).
  • The Action menu under the Infrastructure tab does not contain the version control related actions such as Publish to Git and Update from Git (no. 2).
User interface without version control operations

Connecting to Git

If an inventory is created without version control, it is possible to connect to version control later on. For this, click the Connect to Git button in the Git Connection section of the Inventory Settings screen. The Connect Inventory to Git dialog is opened where you have to specify the details for the connection of the inventory to Git (see the next figure).

The Connect to Git button is only available for unversioned inventories.

Connect Inventory to Git dialog

The following fields in the Connect Inventory to Git dialog are of relevance when you connect an inventory to a version control system:

  • The Git repository field (no. 1 in the figure) Enter the Git URL of the inventory in this field. Click Scan to get immediate feedback on whether the repository exists or not. This field is mandatory.
  • The Branch drop-down menu (no. 2) The Branch drop-down menu lists the available branches in the Git repository. By default, the master branch is selected. If this is not appropriate for your inventory, select the correct branch. This field is mandatory.
  • The Directoryfield (no. 3) In this field, you specify the name of the directory in the repository where the inventory files are stored. This field is mandatory.

Connecting an inventory to Git is only possible if the selected repository/directory is still empty. If this is not the case, then:

  • Manually empty the target directory by using Git tools, or
  • Change the values of the directory, branch or repository in the dialog.