Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA Enterprise SCADA

Add display files to a changeset using Git

  • Last UpdatedApr 24, 2025
  • 2 minute read

You can use a PowerShell script (addFromGit.ps1) to automatically add display files from a Git commit object to the DNAChangeset command line tool.

Note: Git is an open-source version control system and should be installed on the computer where the addFromGit.ps1 PowerShell script will be executed. Git tracks different versions of files in commit objects, which are identified by a Git hash rather than a revision number. The addFromGit.ps1 PowerShell script automates a call to the DNAChangeset command line tool.

To add display files to a changeset using Git

  1. On the desktop, double-click the Windows PowerShell for DNA shortcut.

    Windows PowerShell for DNA opens.

  2. Change to the directory where the Git repository already exists.

  3. Execute the following PowerShell script to add display files to a changeset using Git:

    Note: The PowerShell script should be executed from a directory where the Git repository already exists. The Git changeset must also be available on the computer the PowerShell script is running on. The PowerShell script will not do a Git fetch.

    addFromGit.ps1 -githash <Git hash> -changeset <changeset id>

    Where:

    • -githash <Git hash> is the Git hash identifying the Git commit object from which the display files will be pulled from in Git.

    • -changeset <changeset id> is the identification number of the display changeset to which the display files will be associated.

      Note: Closing the changeset is the responsibility of whoever created it.

      For example, the following command would result in the following example output:

      Note: According to standard Git conventions, the full -githash doesn't need to be provided. You only need to provide enough characters to ensure the Git hash is not ambiguous.

      addFromGit.ps1 -githash 6043ce1c2b78 -changeset 14

      Adding changes from: 6043ce1c2b7852d6fff75d26f57e00d34ca883ee My First Commit

      File "file1.xem" is added into the changeset "14".

      File "file2.xem" is added into the changeset "14".

      File "file3.xem" is added into the changeset "14".

      Finished adding changes to the display changeset ID: 14

  4. After you execute the addFromGit.ps1 -githash 6043ce1c2b78 -changeset 14 command, execute a dnachangeset view --type display --changeset 14 to view the contents of the newly created changeset:

    Changeset: "14"

    Type: "Display"

    Title: "6043ce1c2b7852d6fff75d26f57e00d34ca883ee"

    Description: "My First Commit"

    Path: \file1.xem

    Path: \file2.xem

    Path: \file3.xem