Ranorex Help Center How can we help you?

Git

Using Git for Source Control



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!

    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:

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'.

Adding an existing solution to Git 

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

Adding a new solution to Git
 

The 'Source Control Wizard' will be opened.

Please follow these instructions:

  1. Choose 'Git' as Source Control provider.
    Choose 'Git' as Source Control provider
     
  2. The Ranorex Solution is automatically configured as a new local Git repository.
    All files are indicated with a plus sign in Projects View.
    Files are indicated with a plus sign in Projects View
     

  3. To commit the current state to the local repository click on 'Commit...' in the context menu of the solution.
    Committing the current state to the local repository
     

  4. After the commit a check symbol is shown in Projects View.
    After the commit a check symbol is shown in 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.

  1. Open the 'Tools' menu, move to 'Source Control' and click on 'Checkout…'.
     
     
  2. Choose 'Git' as Source Control provider in Source Control Wizard.
     Choose 'Git' as Source Control provider in Source Control Wizard.
     
  3. 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 press 'OK'.
     Specifying the path to the repository and where you would like to store the files on your local machine
     
  4. The whole repository will be cloned to the local folder.
    After a successful clone this dialog will be shown.
    Dialog shown after a successful clone
     
  5. 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.
    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

Conflicted Indicates a conflict.

Modified

Modified Modified, changes are waiting to be committed.

Added

Added Marked for addition, waiting to be committed.