Create ADO project and Git repo

On this page, you’ll find out how to create a project in Azure DevOps and then a folder that will serve as the Git repository. We’ll also cover adding a custom .gitignore file to the repository folder.

In this chapter

    Create a project in Azure DevOps

    First, we’ll create the Azure DevOps project.

    Log in to your Azure DevOps account.

    Create a new project and enter the details below.

    Click Create project.

    Project name

    Project description (optional)

    Visibility set to private

    Git as version control

    Create the repository folder

    For the integration to work, the Azure DevOps project must have access to the Ranorex Studio solution. This is accomplished through a folder which acts as a Git repository. This repository folder can be local, e.g. on the machine with the Ranorex Studio installation, or in a network.

    The following instructions assume a local repository folder, but they also work for a network folder with some adjustments.

    Create the folder

    Create a folder called myProjects and open it.

    Clone the Azure DevOps project folder

    We now clone the Azure DevOps project folder to the repository folder. To do so:

    Right-click a free space in the repository folder.

    Click Git Bash Here to open the command line.

    In the Azure DevOps project, click Repos.

    Under Clone to your computer, copy the URL of the project folder.

    In the command line, enter git clone and paste the project folder URL.

    Press Enter to execute the clone command.

    The repository folder now contains the cloned Azure DevOps project folder.

    Add .gitignore file

    The .gitignore file in a Git repository tells Git to exclude certain files from commits. If you don’t include this file, the integration will still work fine, but unnecessary files will be included in your commits.

    Note icon


    We’ve prepared a custom .gitignore file for you to download and use in your project. It excludes all the files in a Ranorex Studio solution not needed by Azure DevOps from commits.

    Copy the .gitignore file to the cloned Azure DevOps project folder.

    Right-click in a free space in the project folder and click Git Bash here.

    Enter the following commands, confirming each one with Enter:

    git add .gitignore to add the file to the repository.

    git commit – m “initial gitignore commit” to execute an initial commit.

    git push to push the commit.

    When you refresh the Repos view in Azure DevOps, you will see the .gitignore file in the projects folder.