studio
latest
false
UiPath logo, featuring letters U and I in white

Studio User Guide

Last updated Dec 17, 2024

Adding a Project to GIT

The GIT Init feature adds the current project to a local GIT repository. Access the command from the Team tab, or the status bar.

  1. Create or open a project in Studio. Click the Start tab > Team. The Team tab is displayed.
  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 the parent folder. The Commit changes window opens.



  3. The Modified Files section shows the project’s files that are to be added to the Git repo. Clear the box next to the ones that you don’t want to add or use Select All, Select None.
  4. Select 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.

When a project is added to GIT, the context menu in the Project panel includes GIT-specific options. For more information, see Context Menu Options for GIT.

Note:
  • The .local folder, which contains data cached locally for the project, should not be added to GIT.
  • Use the .gitignore file to add folders that you want to ignore from GIT

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 Manage Remotes window is displayed. The window is also available from the status bar.



  2. In the Name section, add the name of the remote repository.
  3. 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 local repository is not synchronized 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.

The number of unpushed changes, and newly added files are visible in the status bar. Click the icon to open the Commit Changes window, or the icon to push changes.

Note: If you edit a file from a project added to source control in an external editor, the change is visible in the Project panel and the status bar only after you click Refresh docs image in the Project panel.

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 Project panel and select Commit. The Commit Changes window is displayed.



  2. Select the Amend Commit box. The last commit message is displayed, together with the files that were committed. To view changes between the current file and the last commit, use the Show Changes option.
  3. 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 you commit and push them 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.

Note: The Undo does not cover unversioned files. If you create new files and then select Undo, the files are not removed from the project. Once added to the project tree, new files remain there unless they are manually deleted.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.