Skip to main content
Version: 4.5.x LTS

Connecting Inventories to Git

Before connecting your inventory to Git, consider the best practices described in Git Setup.

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 of the Inventory Editorscreen sidebar only contains the function Create Inventory. The functions Update inventory form Gitand Publish Inventory to Gitare not available (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.

You specify the details for the connection of the inventory to Git in the Connect Inventory to Git dialog (see the next figure). This dialog appears when you click the Connect to Git button in the Git Connection section of the Inventory Settings screen.

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.