Git

In this chapter

    About Git and Ranorex Studio

    Git is a distributed version control system which is free and open source.

    In order to use Git as a source control provider in Ranorex Studio, the following preconditions have to be fulfilled in the given order:

    • Git needs to be installed
      Download Git for Windows here: https://git-scm.com/download/win
       
      Please make sure you choose to ‘Use Git from the Windows Command Prompt’ during Git installation!
    • TortoiseGit needs to be installed
      Download TortoiseGit here: https://tortoisegit.org/download

      TortoiseGit is a Windows shell interface to Git and is needed, for example, to overlay icons which show the file status.

    Ranorex Studio will assist you with this dialog in case the required prerequisite is not present on the machine:

    Add a Ranorex Solution to Git

    Please make sure your Git infrastructure is set up and working.

    To add an existing Ranorex Solution to Git, open the context menu of the solution. Go to ‘Source Control’ and select ‘Add Solution to Source Control’.

    To add a new Ranorex Solution to Git, check the option ‘Add to Source Control’ in the ‘New Project’ dialog.

    The ‘Source Control Wizard’ will be opened.

    Please follow these instructions:

    Choose Git as Source Control provider.

    The Ranorex solution is automatically configured as a new local Git repository. All files are indicated with a plus sign in the projects view.
    To commit the current state to the local repository click Commit… in the context menu of the solution.
    After the commit a check symbol is shown in the projects view.
    All further Git related steps should be defined in your workflow.

    Check out a Ranorex Solution from Git

    Please make sure your Git infrastructure is set up and working.

    Go to Tools > Source Control > Checkout…

    Choose Git in the Source Control Wizard.
    TortoiseGit will ask you for the path to the repository and where you would like to store the files on your local machine. Fill in the URL to the Git repository as well as the path to the local directory and click OK.
    The whole repository will be cloned to the local folder. After a successful clone this dialog will be shown.
    In case your repository includes a Ranorex Solution in its root, this solution will be opened automatically. If this is not the case, you have to open the Ranorex Solution manually from the file System.

    After opening the Ranorex Solution from the local folder you see the icon overlays in Projects View.

    All further Git related steps should be defined in your workflow.

    Icon overlays in Projects View

    Overlay icons are added to the items in the Projects View in Ranorex Studio, as the solution is under source control.

    Icon overlays
    Normal Not locally modified, no changes waiting for commit.
    Conflicted Indicates a conflict.
    Modified Modified, changes are waiting to be committed.
    Added Marked for addition, waiting to be committed.