Version control, also known as source control, is the practice of tracking and managing changes to software code or files within a project. Version control systems are software tools that help teams manage changes to a project over time.
Version control software helps keep track of changes and keeps team members working off the latest version. It should help you develop and ship faster by improving visibility and helping teams collaborate. Changes are stored in a type of database, called a repository. If a mistake is made, you can compare earlier versions of the StudioX project to help fix the mistake while minimizing disruption to all team members.
Note:
This tutorial only applies to StudioX v2020.10 and v2021.4. For newer versions of StudioX see Managing projects with GIT in the StudioX guide.
While there are various version control software available, this guide uses Bitbucket and GitHub Desktop as examples.
Creating Repositories
Have your administrator or team manager create repositories for you. A general best practice is to have two repositories:
- A personal repository for you to store your personal StudioX projects, where other users are unlikely to need access.
- A shared team repository for StudioX projects where all the members of your team or organization are likely to need access to the project files.
Tips and resources
- Work only with a single branch (for example, master).
- Don't create additional branches or pull requests without a good reason. These can complicate the process of using version control.
- Always do a Pull request to synchronize any changes from the repository prior to beginning work on a project.
- Always do a Commit and a Push when you finish working on a project to make sure your changes are uploaded to the repository.
- For more in-depth GitHub guides, visit the GitHub Dekstop documentation portal.
- For more guides related working the Sourcetree app, visit Atlassian's documentation porta.
GitHub Desktop
Downloading and Installing GitHub Desktop
To begin using GitHub Desktop you need to download, install, and configure it on your machine. To do so, visit GitHub's guide on how to download and install their software.
Setting up GitHub Desktop on your machine
If you don't already have an account, create one and log in to the GitHub Desktop application.
To connect a repository to your local project:
- Open the GitHub Desktop application.
- Click the File menu and select Clone repository.
- In the window that opens:
- Click the GitHub.com tab.
- Enter the name of the repository.
- Enter your
\Documents\UiPath
folder path in the Local path field.
- Click Clone once everything is set up.
Working with Projects
Sync any changes from the repository
Before creating a new project or making changes to an existing project in StudioX, make sure all projects are closed in StudioX (the safest way is to make sure all StudioX instances are closed)
- Open the GitHub Desktop application.
- Choose the repository containing the project you are working with.
- Click the Repository menu at the top and select Pull.
Create a new project
To create a new StudioX project that uses version control:
- Create a new task in StudioX.
- In the Location field, browse to the folder that represents the correct repository (personal or shared team).
This places the project in its own folder at the root of the repository.
Note:
For existing projects, if you'd like to move it into version control, the folder can be
manually moved into the repository folder.
Committing changes
You can save (commit) changes from your local machine to the online repository as often as you need to.
- Close the project in StudioX.
- Open the GitHub Desktop application.
- Choose the repository containing the StudioX project that you wish to commit changes for.
- Enter in a short summary of the changes in the Summary field.
- Click the Commit button.
- Click the Repository menu at the top and select Pull.
- Click the Push origin button to send your changes to the repository.
Bitbucket
Downloading and Installing the Sourcetree app
To begin using Sourcetree, you need to download, install, and configure it on your machine. To do so, visit Atlassian's guide on how to download and install their software.
Working with Projects
Sync any changes from the repository
Before creating a new project or making changes to an existing project in StudioX, make sure all projects are closed in StudioX (the safest way is to make sure all StudioX instances are closed)
- Open the Sourcetree application.
- Click Remote at the top.
- Select the repository containing the project you are working with by clicking Clone.
Create a new project
To create a new StudioX project that uses version control:
- Create a new task in StudioX.
- In the Location field, browse to the folder that represents the correct repository (personal or shared team).
This places the project in its own folder at the root of the repository.
Note:
If there are existing projects that need to be moved into version control, the folder can be
manually moved into the repository folder.
Committing changes
You can save (commit) changes from your local machine to the online repository as often as you need to.
- Close the project in StudioX.
- Open the Sourcetree application.
- Make sure the repository containing the StudioX project is selected.
- Click the
+
icon next to the files you want to commit to add them to the list.
- Select the Push changes immediately to origin/master check box.
- Type in a message and click Commit in the lower-right corner.
Updated about a year ago