◷ Reading Time: 7 minutes
FlexRule’s built-in source control enables the use of Git as your version controlling system for FlexRule Designer projects.
Add Source Control
Click on the Add Source Control button at the bottom of the window.

Select Local Git.

Then the Source Control options will be updated showing,
- Number of commits waiting to be pushed
- Number of files modified waiting to be committed
- The current branch you have checked out

Commit Changes
You can compare versions and commit and push changes.
At the bottom of the screen, you can see the number of changed files. Click on that and you will be directed to the window with the list of changed files.

- Commit and Push: Commit and push changes to the remote repository
- Commit: Commit changes
- Show Changes: Show the changes compared to the previous version

- Select All: Select all changed files
- Deselect All: Deselect the selected files
- Commit Message: Comment to be added to the commit
Manage Repositories
Click on the branch name (in this example, it is master) to see the repository options.
- Manage Remotes
- Manage Branches
- Manage Commits

Manage Remotes
Manage Remotes is used to view and manage remote repositories.

- Add: Add a remote repository
- Name: Name of the repository
- Uri: Full link to the repository

- Edit: Edit an added remote repository
- Delete: Delete an added remote repository
- Set Default: When you have a list of remote repositories, set one of them as a default repository. It will be shown in bold.

- Refresh: Refresh the list of repositories
Manage Branches
Manage branches of the repository.

- Add New: Add a new branch

- Check Out: Use the selected branch.
Once you check out a branch you can see which branch you are in - Refresh: Refresh the list of branches
Manage Commits
You can view and manage the commits.

- Push: Push to the remote repository
- Pull: Pull from the remote repository
- FIles: See the changed files of each commit
- Content: See the file content
Push to Remote Repository
Once you commit changes, you can see the number of commits waiting to be pushed to the remote repository.
Click on the push icon and you can enter the credentials to your Git account. You can use the login or token.
If the branch does not exist, it will create the branch and push.


You can see the updated remote repository as follows.

Conflict Resolution
The remote repository and the local repository have different versions of the same files, it identifies the changes and provides options to eliminate the conflict.
In this situation, you should first pull

Then you will see the conflicted file can be seen which is the file you edited in both remotely and locally.

The file content changes can be seen.

You can decide whether to,
- Accept local repository changes
- Accept remote repository changes

Add a commit message and commit.

After that, you can push the new commit.

If you refresh the files in Project Explorer, close the conflicted file in the Designer, and open it again, you will see the updated file according to the option you selected.