Git is a free, open-source distributed version control system.
This article explains the prerequisites for using Git with Ranorex Studio and how to add or check out a Ranorex solution under Git source control. Ranorex Studio’s current Git integration relies on Git for Windows and TortoiseGit.
Before you start
Before using Git in Ranorex Studio, make sure the following prerequisites are installed in this order:
-
Git for Windows: During installation, select Use Git from the Windows Command Prompt. Ranorex documentation still lists this as a required installation option, https://git-scm.com/download/win.
-
TortoiseGit
TortoiseGit provides the Windows shell integration used by Ranorex Studio, including file status overlay icons in the Projects view, https://tortoisegit.org/download.
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
Make sure your Git environment is already set up and working correctly before you begin.
To add an existing Ranorex solution to Git:
- In the Projects view, right-click the solution.
- Select Source Control > Add Solution to Source Control.
To add a new Ranorex solution to Git:
- Create a new solution.
- In the New Project dialog, select Add to Source Control.
The Source Control Wizard opens.
- Select Git as the source control provider.
- Ranorex Studio configures the solution as a new local Git repository. The files appear with an Added overlay icon in the Projects view.
- Right-click the solution and click Commit... to commit the current state to the local repository.
- After the commit is completed, the overlay icon changes to indicate that the files are no longer waiting to be committed.
Check out a Ranorex solution from Git
Make sure your Git environment is already set up and working correctly before you begin.
To check out a Ranorex solution from Git:
- Go to Tools > Source Control > Checkout...
- In the Source Control Wizard, select Git.
- In the TortoiseGit dialog, enter:
- the URL of the Git repository
- the local folder where the repository should be cloned
- Click OK. TortoiseGit clones the repository to the selected local folder.
- If the repository contains a Ranorex solution in its root folder, Ranorex Studio opens it automatically. Otherwise, open the solution manually from the local file system.
After the solution is opened, Ranorex Studio displays the Git overlay icons in the Projects view.
Icon overlays in Projects view
When a solution is under Git source control, Ranorex Studio displays overlay icons in the Projects view to indicate file status.
| Icon overlays | |
|
|
Not locally modified, no changes waiting for commit. |
|
|
Indicates a conflict. |
|
|
Modified, changes are waiting to be committed. |
|
|
Marked for addition, waiting to be committed. |