UiPath Studio Guide

GIT Version Control

Cloning a remote GIT repository

  1. In the Team tab, select Clone a GIT repository. The Clone a remote GIT repository window opens.
  1. Type in the Repository URL and choose an empty Check out directory. Click Open. The Enter Credentials window opens.

Note:

Clone with SSH is currently not supported. Please use Clone with HTTPS instead.

  1. Add your Git username and password credentials, then click OK. The repository is now cloned in the check out directory. If the repository contains a workflow, Studio opens the project in the Designer panel. If not, the Open window is prompted.

Note:

GIT integration with Studio does not currently support two-factor authentication. As a workaround, use SSO authentication method with a personal token, or the basic access authentication method.

  1. In the Open window, select a project.json file to open in Studio.

After cloning a GIT repository to a local working directory, the .git subdirectory is created containing the necessary GIT metadata. The metadata includes subdirectories for objects, refs, and template files. In addition, a HEAD file is also created, which points to the currently checked out commit.

Field Descriptions for GIT Context Menu

Right click a file or project node in the Properties panel to open the GIT-specific context menu.

Option
Description

Commit

Commits current changes to the local GIT repository.

Push

Pushes the current version onto the remote repository.

Pull (rebase)

Pulls remote files and rebases the current branch.

Manage Branches

Opens the GIT window with options for managing currently added branches.

Show Changes

Opens the File Diff window for comparing changes between the local version and the remote version of the file.

Show History

Opens the Show History window for comparing two versions of the same file.

Undo

Opens the Undo Pending Changes window if the file was not committed or pushed to the remote repository.

Adding a project to GIT

The GIT Init feature adds the current project to a local GIT repository.

  1. Create or open a project in Studio. Click the Show Team Page button in the Project panel or the Start button > Team. This opens the Team tab.
  2. Click the GIT Init button, and then select a path where the repository should be initialized. The location may be the same as the project or parent folder. The Commit changes window opens.
  1. The Modified Files section shows the project’s files that are to be added to the Git repo. Uncheck the box next to the ones that you don’t want to add or use Select All, Select None.
  2. Check the Show Unversioned Files box to add unversioned files to the list.
    Write a Commit Message. Click the Commit button to commit the changes to the local Git repository.

Committing and Pushing to GIT

  1. From the same Commit Changes window, click the Commit and Push button to commit the changes and push them to the remote repository. This opens the GIT window.
  1. In the Name section, add the name of the remote repository. In the URL section, add the remote URL.
    If you want to make modifications to the added repositories, simply click an entry, change the name and URL, then click the Update button. When you're done click Add, then Save. The following message box opens. This means that the remote repository is asynchronized with the remote one.
  • Click the Overwrite remote content button to push the local versions of files to the remote repository and overwrite the files there.
  • Click the Pull (rebase) button to pull the remote files and rebase the current branch.
  • Click the Cancel button to discard the whole operation.

Changing the Last Commit

Studio integration with Git also comes with an Amend Commit option for changing the last performed commit, before the push was performed.

  1. Right click a modified file in the Properties panel and select Commit. The Commit Changes window opens.
  1. Check the Amend Commit box, the last commit message is displayed, together with the files that were committed. Change the commit message and select the files that you would like to include. Click the Commit and Push or Commit button.

Undoing Pending Changes

Studio comes with the option to undo changes that have been made to versioned files, before the files are committed and pushed to the remote repository.

After making changes to a file in the local repository, click Undo in the GIT context menu to open the Undo Pending Changes window.

Select the checkbox next to the files and click Undo. The files are now reverted to the state before the changes were made.

Copying a Project to GIT

The Copy to GIT button in Studio Backstage view allows you to copy the current project to an existing GIT repository.

To do so first open or create a project in Studio. In the Team tab, select Copy to GIT and pick an existing GIT repository folder on your machine. The project is added to the local GIT repository and the Copy to GIT message box opens.

  • Select Yes to open the project from the new location. The Commit Changes window opens. Write a Commit message and click Commit and Push or just Commit.
  • Select No to return to the Studio user-interface.

Creating and Managing Branches

  1. In the Properties panel, right click the project node or contained file, select Manage Branches. The GIT window opens.
  1. Add a branch by clicking on the image alt text button. Write a name for the branch in the Name section. Click Add and then Save.

Right click any branch to display the options for Git branches:

  • The Checkout branch option switches to the selected branch.
  • The Rebase option rebases the current branch onto the selected branch.
  • The Merge option merges the selected branch into the current branch.

In order to merge a branch into the master of a GIT remote repository, you need to have the master branch checked out in Studio and then merge the modified branch into master.

Solving Conflicts

Git integration with Studio comes with a feature for solving conflicts that may occur when performing the Rebase or Push command, found in the Commit Changes window.

Whenever Studio detects a conflict between the local file and the one found in the remote repository, the Solve conflicts window opens.

The window is similar to File Diff, showing the differences between the Remote version of the file and the Local version.

Field Descriptions for the Solve Conflicts window

Option
Description

Choose Left

Select the left file representing the file in the remote repository to push.

Choose Right

Select the right file representing the file in the local repository to push.

Save

Click Save after choosing the left or right file.

Cancel

Cancel the operation and exit the Solve conflicts window.

Previous

Navigates to the previous change in the compared files.

Next

Navigates to the next change in the compared files.

Collapse All

Collapses all nodes in the .xaml files.

Expand All

Expands all nodes in the .xaml files.

Disconnecting from GIT

The Disconnect option from Studio Backstage view, Team tab is available for versioned files in the following two cases:

  1. A process is initialized as a local GIT repository. Create a new process, use GIT Init to add it to a local GIT repository and then use Disconnect to remove the subversion tag.
  2. The subversion tag can be removed by clicking Disconnect for a GIT repository which includes parent and child projects.
  3. If you disconnect a child project, then the entire GIT repository that contains the opened project is disconnected from source control. A message box is displayed in Studio requiring your confirmation before the disconnect action is performed.

GIT Version Control


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.