About the course
This course provides an overview of the version control systems which can be used with UiPath Studio, with a focus on the main actions you can perform with Git.
What you will learn in this course
At the end of this course you should be able to:
- Explain what version control systems are.
- Identify the version control systems that are integrated in UiPath Studio.
- Perform the most important actions within a version control system integration (we will use Git as an example).
Introduction to Version Control Systems
Version control systems are tools used by software development teams to manage collaboration on large projects.
A version control system allows developers to track a code change, review the history of the code, and revert to a previous version of the project if needed.
Here are some benefits of using version control systems:
Enhanced collaboration: Team members can work freely on any file at any time and merge the changes into a common version at the right time.
Storing versions: Only the current version is stored on the disk, all the others are in the system.
Restoring previous versions: Restore older versions of the file at any time.
Tracking different project versions: New versions are usually saved with change descriptions. Versions of the same file can also be compared.
The version control systems UiPath Studio is integrated with are Git, TFS, and SVN. The connection to a version control system is done at the project level. To manage your connections, access Studio, go to the Backstage view, and click the Team tab.
Alternatively, the Add to Source Control button in the status bar offers shortcuts to Git Init, Copy to Git, Add to TFS, and Add to SVN.
Git is an open-source version control system. Git is distributed, unlike older centralized version control systems such as SVN and CVS, which allows every developer to have a complete history of their code repository locally. This makes the initial clone of the repository slower, but subsequent operations such as commit, blame, diff, merge, and log dramatically faster.
Git also has good support for branching, merging, and rewriting repository history. The pull request is one popular feature that allows teams to collaborate on Git branches and efficiently review each other’s code. Git is the most widely used version control system in the world and is considered the modern standard in software development.
How does Git work?
Here is a basic overview of how Git works:
- Create a repository (project) with a Git hosting tool.
- Copy or clone the repository to your local machine.
- Add a file to your local repository and commit (save) the changes locally.
- Push your changes to the remote repository.
- Pull the file to local repository and make changes, and then commit and push the file.
- Create a branch (alternative), make a change, commit the change.
- Open a pull request (propose changes to the master branch).
- Merge your branch to the master branch.
SVN and Git side-by-side
|With a centralized system, the SVN version control system stores all files and historical data on a central server. The developers commit their changes to this central server repository.|
Trunk: The trunk is the hub of your current, stable code and product. It only includes tested, unbroken code.
Branches: Here you add the new codes and features. Using a copy of the trunk code, team members conduct research and development in the branch. This allows each team member to work on the enhanced features without disrupting each other’s progress.
Tags: Tags are a duplicate of a branch at a given point in time. Tags are not used during development but are used during deployment after the branch’s code is completed. Marking code with tags makes it easy to review and, if necessary, revert your code.
|Git uses a central repository and a series of local repositories. Local repositories are exact copies of the central repository containing their complete history of updates.|
The Git workflow is similar to SVN, but with an extra step. To create a new feature, we need to take an exact copy of the central repository to create our local repository on your local machine (consider this as our “local trunk”).
Then we work on our local repository exactly as we would in SVN by creating new branches, tags, etc. When we’re done, we merge our branches into our local repository (i.e. local trunk). When we’re ready to merge into the central repository, we push our changes from our local repository to the central repository.
Some of the benefits include the following:
It’s faster to commit.
No more single point of failure.
It’s available offline.
What are the benefits of using source control systems?
- Better collaboration
- Track different project versions
Which of the following option in UiPath Studio allows you to create a local repository and copy the project to it?
Answer: Git Init
What do branches allow our team to do?
Answer: Develop and test various features in parallel.
What can you tell about the current project by looking at the Status bar?
- The project has been committed once since the last pull (one ahead)
- Two changes have been made since the last commit
- The project is connected to a version control system
- We are currently working in the master branch
You’ve been assigned to work on a new automation project. You need to get the project template which is already stored in a remote Git repository. Which option do you need to use in the Studio Team tab?
Answer: Clone Repository
Which activity can be used to extract specific information from multiple native PDF files with the same structure?
Answer: Get Text Activity
We want to integrate the updates pushed to the remote master branch into a feature branch. What do we need to do?
Answer: While working in the feature branch, select Manage Branches > Select the master branch and select Merge
When working with the Show Changes option it’s good to know that it works at ____________ level.
Answer: Workflow file
How can you overwrite the last commit to a Git repository in UiPath Studio?
Answer: By selecting Amend Commit in the Commit Changes window
At the start of your day, you’ve pulled the latest version of the project you’re working on from the remote Git repository. You’ve been working for two hours and now you want to check the difference between your version of the project and the last committed version.
How can you do this?
Answer: By selecting Show Changes in the Project context menu